0
votes

Creating teams via the Graph API used to work fine using this json:

// POST https://graph.microsoft.com/v1.0/teams
{
    "[email protected]": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
    "displayName": "TeamName",
    "members": [
        {
            "roles": [
                "owner"
            ],
            "[email protected]": "https://graph.microsoft.com/v1.0/users('...')",
            "@odata.type": "#microsoft.graph.aadUserConversationMember"
        }
    ]
}

but now I keep getting this error:

{
    "error": {
        "code": "NotFound",
        "message": "Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: NotFound, Response Headers: ...",
        "innerError": {
            "message": "Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: NotFound, Response Headers: Strict-Transport-Security: ..., ErrorMessage : {\"errors\":[{\"message\":\"Error when calling Middle Tier. Message: ''. Error code: 'NotFound'. Status code: NotFound.\",\"errorCode\":\"Unknown\"}],\"operationId\":\"...\"}",
            "code": "ItemNotFound",
            "innerError": {},
            "date": "2021-11-05T15:49:22",
            "request-id": "...",
            "client-request-id": "..."
        }
    }
}

Am I doing somthing wrong or is this a regression? If it is, I would very much appreciate a fix from Microsoft since I need the ability to create teams.

1
We have repro this issue. The user id whichever mentioned in [email protected] need to correct. If the user is not present of that id, then NotFound error come. Could you please check using another user id.? - Hunaid Hanfee-MSFT
Could you please confirm if your issue is resolved with above solution or still you need any help? - Prasad-MSFT

1 Answers

1
votes

The user id whichever mentioned in [email protected] need to correct. If the user is not present of that id, then NotFound error come.

Please check you are passing correct user id.