team activation via graph beta API

%3CLINGO-SUB%20id%3D%22lingo-sub-1798976%22%20slang%3D%22en-US%22%3Eteam%20activation%20via%20graph%20beta%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1798976%22%20slang%3D%22en-US%22%3E%3CP%3EI%20will%20try%20to%20activate%20my%20created%20team%20via%20graph%20beta%20api%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3EPATCH%20https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fteams%2F%7Bid%7D%0A%0Aapplication%2Fjson%0A%7B%0A%22isMembershipLimitedToOwners%22%3A%20false%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20I%20get%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22error%22%3A%20%7B%0A%20%20%20%20%22code%22%3A%20%22Unauthorized%22%2C%0A%20%20%20%20%22message%22%3A%20%22Failed%20to%20execute%20Aad%20backend%20request%20GetUserFromIdRequest.%20Workload%20Unknown.%20Request%20Url%3A%20https%3A%2F%2Fgraph.windows.net%2Fmyorganization%2Fusers%2F88da0665-cb4b-4589-9908-69ad7b2610cd%3Fapi-version%3D1.61-internal%2C%20Request%20Method%3A%20GET%2C%20Response%20Status%20Code%3A%20Unauthorized%2C%20Response%20Headers%3A%20ocp-aad-diagnostics-server-name%3A%20%2BqxKcF8fdS5fQt1pjEtVUjr3KUrze5SW8P13F0fLcLg%3D%5Cr%5Cnrequest-id%3A%20f9ec4b7e-29b0-4069-a29b-feb70d64d6c8%5Cr%5Cnclient-request-id%3A%209318033c-5d41-487b-94af-473eb5ba44a3%5Cr%5CnStrict-Transport-Security%3A%20max-age%3D31536000%3B%20includeSubDomains%5Cr%5CnDate%3A%20Tue%2C%2020%20Oct%202020%2011%3A01%3A29%20GMT%5Cr%5Cn%2C%20Reason%20Phrase%3A%20Unauthorized%22%2C%0A%20%20%20%20%22innerError%22%3A%20%7B%0A%20%20%20%20%20%20%22date%22%3A%20%222020-10-20T11%3A01%3A30%22%2C%0A%20%20%20%20%20%20%22request-id%22%3A%20%22bd7cfd16-803d-426b-ba23-c5a3205172ff%22%2C%0A%20%20%20%20%20%20%22client-request-id%22%3A%20%22bd7cfd16-803d-426b-ba23-c5a3205172ff%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20tell%20me%20how%20to%20solve%20the%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20calling%20the%20graph%20api%20using%20my%20registered%20application%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fauth-v2-service%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fauth-v2-service%3C%2FA%3E)%20with%20the%20permissions%20listed%20below%20(from%20JWT%20token)%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20...%2C%0A%20%20%22roles%22%3A%20%5B%0A%20%20%20%20%22TeamSettings.ReadWrite.All%22%2C%0A%20%20%20%20%22EduRoster.Read.All%22%2C%0A%20%20%20%20%22User.ReadWrite.All%22%2C%0A%20%20%20%20%22Domain.ReadWrite.All%22%2C%0A%20%20%20%20%22Application.ReadWrite.All%22%2C%0A%20%20%20%20%22Directory.ReadWrite.All%22%2C%0A%20%20%20%20%22Sites.Read.All%22%2C%0A%20%20%20%20%22Group.ReadWrite.All%22%2C%0A%20%20%20%20%22EduRoster.ReadWrite.All%22%2C%0A%20%20%20%20%22Files.ReadWrite.All%22%2C%0A%20%20%20%20%22Organization.ReadWrite.All%22%2C%0A%20%20%20%20%22Calendars.ReadWrite%22%2C%0A%20%20%20%20%22GroupMember.ReadWrite.All%22%2C%0A%20%20%20%20%22AuditLog.Read.All%22%2C%0A%20%20%20%20%22Member.Read.Hidden%22%2C%0A%20%20%20%20%22Reports.Read.All%22%2C%0A%20%20%20%20%22Notes.ReadWrite.All%22%0A%20%20%5D%2C%0A%20%20...%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1798976%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I will try to activate my created team via graph beta api:

 

PATCH https://graph.microsoft.com/beta/teams/{id}

application/json
{
"isMembershipLimitedToOwners": false
}

 

 

and I get error:

 

{
  "error": {
    "code": "Unauthorized",
    "message": "Failed to execute Aad backend request GetUserFromIdRequest. Workload Unknown. Request Url: https://graph.windows.net/myorganization/users/88da0665-cb4b-4589-9908-69ad7b2610cd?api-version=1.61-internal, Request Method: GET, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: +qxKcF8fdS5fQt1pjEtVUjr3KUrze5SW8P13F0fLcLg=\r\nrequest-id: f9ec4b7e-29b0-4069-a29b-feb70d64d6c8\r\nclient-request-id: 9318033c-5d41-487b-94af-473eb5ba44a3\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Tue, 20 Oct 2020 11:01:29 GMT\r\n, Reason Phrase: Unauthorized",
    "innerError": {
      "date": "2020-10-20T11:01:30",
      "request-id": "bd7cfd16-803d-426b-ba23-c5a3205172ff",
      "client-request-id": "bd7cfd16-803d-426b-ba23-c5a3205172ff"
    }
  }
}

 

 

Please tell me how to solve the problem.

 

I am calling the graph api using my registered application (https://docs.microsoft.com/en-us/graph/auth-v2-service) with the permissions listed below (from JWT token):

{
  ...,
  "roles": [
    "TeamSettings.ReadWrite.All",
    "EduRoster.Read.All",
    "User.ReadWrite.All",
    "Domain.ReadWrite.All",
    "Application.ReadWrite.All",
    "Directory.ReadWrite.All",
    "Sites.Read.All",
    "Group.ReadWrite.All",
    "EduRoster.ReadWrite.All",
    "Files.ReadWrite.All",
    "Organization.ReadWrite.All",
    "Calendars.ReadWrite",
    "GroupMember.ReadWrite.All",
    "AuditLog.Read.All",
    "Member.Read.Hidden",
    "Reports.Read.All",
    "Notes.ReadWrite.All"
  ],
  ...
}

 

0 Replies