I'm trying to post subscription request to graph api via https://graph.microsoft.com/v1.0/subscriptions endpoint. However, I keep getting this error:
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: InternalServerError; Reason: Expected 1 response for tenant lookup for tenant id ... but received 0]
My request:
{
"changeType": "created,updated",
"notificationUrl": "https://.../notification",
"resource": "communications/callRecords",
"expirationDateTime": "2021-03-24T18:23:45.9356913Z",
"clientState": "secretClientValue"
}
I'm able to get token with my tenant id as grant_type = client_credentials (OAuth 2.0 client credentials grant flow). I do not understand why my tenant gives error when subscribing, although token creation is successful. What am I doing wrong? Please help!
Thanks.
Update: Permissions of my application:
- Calendars.ReadWrite Application
- CallRecords.Read.All Application
- Directory.ReadWrite.All Application
- OnlineMeetings.Read.All Application
Admin consent is granted for all.
/communications/callRecords
and see. – Shiva Keshav Varma