Unsupported AAD Identity while calling communications create calls api

Dhanashree Mane 1 Reputation point
2021-08-10T06:51:04.217+00:00

I have followed the Build Python Django apps with Microsoft Graph link .
https://learn.microsoft.com/en-us/graph/tutorials/python

In oauth_settings.py file I have added the below scope

scopes:

  • user.read
  • mailboxsettings.read
  • calendars.readwrite
  • onlinemeetings.readwrite
  • user.readwrite.all
    -Calls.Initiate.All

Not able to add the Calls.Initiate.All permission in scopes.
error-
The application 'demoapp' asked for scope 'Calls.Initiate.All' "
"that doesn't exist on the resource

I am able to get the access token and then pass the token to below calls api
data = {
"@odata.type": "#microsoft.graph.call",
"callbackUri": "http://localhost:8000/callback",
"targets": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"displayName": name,
"id": id
}
}
}
],
"requestedModalities": [
"audio"
],
"mediaConfig": {
"@odata.type": "#microsoft.graph.serviceHostedMediaConfig"
}
}
requests.post('https://graph.microsoft.com/v1.0/communications/calls',headers=get_header(token),json=data)

Facing below error when Calls.Initiate.All permission is not added in scopes for calls api -
error -
{"error":{"code":"UnknownError","message":"{\"errorCode\":\"7500\",\"message\":\"Unsupported AAD Identity.\",\"instanceAnnotations\":[]}","innerError":{"date":"2021-08-09T12:25:10","request-id":"6de1e640-0fc2-49d7-a52b-5a67efbecd7b","client-request-id":"6de1e640-0fc2-49d7-a52b-5a67efbecd7b"}}}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,663 questions
0 comments No comments
{count} votes