403 Forbidden error while calling the create team Graph API

Arohi Deshpande 25 Reputation points
2023-07-20T07:45:16.69+00:00
Hi,

I have been using the create team API, it was working fine couple days back, there was no change in permissions or even in the code. Since 2 days we are facing 403 forbidden error.

URL:

https://graph.microsoft.com/v1.0/teams

with request payload as mentioned below:

{
    "email address removed for privacy reasons": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
    "displayName": "Architecture test Team",
    "description": "The team for those in architecture design."
}
I have provided the required permissions for both application as well as delegated. Please find screenshot of the same
The response is:
{
    "error": {
        "code": "Forbidden",
        "message": "Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/apac/templates/api/team, Request Method: POST, Response Status Code: Forbidden, Response Headers: Strict-Transport-Security: max-age=2592000x-operationid: e0e36994bd8341ce936b7ef080a64f52x-telemetryid: 00-e0e36994bd8341ce936b7ef080a64f52-49c1a1267b1789f1-01X-MSEdge-Ref: Ref A: 21AF592ACFD244CA86C67D5750C3F243 Ref B: TYO01EDGE2718 Ref C: 2023-07-19T20:16:46ZDate: Wed, 19 Jul 2023 20:16:46 GMT, ErrorMessage : {\"errors\":[{\"message\":\"Error when calling Middle Tier. Message: ''. Error code: 'GetApplicableSkuCategoriesForUserFailed'. Status code: Forbidden.\",\"errorCode\":\"Unknown\"}],\"operationId\":\"e0e36994bd8341ce936b7ef080a64f52\"}",
        "innerError": {
            "message": "Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/apac/templates/api/team, Request Method: POST, Response Status Code: Forbidden, Response Headers: Strict-Transport-Security: max-age=2592000x-operationid: e0e36994bd8341ce936b7ef080a64f52x-telemetryid: 00-e0e36994bd8341ce936b7ef080a64f52-49c1a1267b1789f1-01X-MSEdge-Ref: Ref A: 21AF592ACFD244CA86C67D5750C3F243 Ref B: TYO01EDGE2718 Ref C: 2023-07-19T20:16:46ZDate: Wed, 19 Jul 2023 20:16:46 GMT, ErrorMessage : {\"errors\":[{\"message\":\"Error when calling Middle Tier. Message: ''. Error code: 'GetApplicableSkuCategoriesForUserFailed'. Status code: Forbidden.\",\"errorCode\":\"Unknown\"}],\"operationId\":\"e0e36994bd8341ce936b7ef080a64f52\"}",
            "code": "AccessDenied",
            "innerError": {},
            "date": "2023-07-19T20:16:46",
            "request-id": "e0e36994-bd83-41ce-936b-7ef080a64f52",
            "client-request-id": "4aa73188-19d4-9382-2235-0530552047ec"
        }
    }
}
 
Any help in this regard is appriciated.
 
Thank you.
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,614 questions
{count} vote

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 36,976 Reputation points
    2023-07-21T09:15:39.38+00:00

    Hi @Arohi Deshpande

    • Make sure the logged in user is a work/school account and not a personal account.
    • Make sure the logged in user has an O365 license.

    Refresh the browser page after meeting the above requirements, and then try calling again.

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.