403 Forbidden error when using create team Graph API

katkem 0 Reputation points
2023-07-20T07:42:20.9733333+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 appreciated.
 
Thank you.
						
					
			
		
	
			
	
	
	
	
	

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. TH-4749-MSFT 3,315 Reputation points
    2023-07-21T15:59:50.7833333+00:00

    Hi katkem,

    Thanks for reaching out. I am unable to reproduce the issue you are experiencing. I used the below request body per article https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=http

    {
        "******@odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
        "displayName": "My Sample Team",
        "description": "My Sample Team’s Description"
    }
    

    Please verify if you are using the correct parameters in the body and if the token generated has all the requisite permissions by decoding it via jwt.ms.

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

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.