Hi, I created 30 day free trial account on office 365 and then I registered app on Azure portal.
I'm testing creating new shifts by Ms graph API by executing endpoint:
https://graph.microsoft.com/v1.0/teams/{teamId}/schedule/shifts
Unfortunately I receive error 403 like below in response:
{
"error": {
"code": "Forbidden",
"message": "{\"error\":{\"code\":\"Forbidden\",\"message\":\"Sorry, you need to be an admin to do this.\",\"details\":[],\"innererror\":{\"code\":\"MissingAdminPermissions\"}}}",
"innerError": {
"date": "2021-08-20T08:30:02",
"request-id": "d7595e09-3ed5-47b6-8365-e844cfee65c9",
"client-request-id": "d7595e09-3ed5-47b6-8365-e844cfee65c9"
}
}
}

I don't know where is the problem. Based on Ms Graph documentation https://docs.microsoft.com/en-us/graph/api/schedule-post-shifts?view=graph-rest-1.0&tabs=http#permissions I have gained required permission Schedule.ReadWrite.All: In fact I have granted all available permissions:

Other endpoints works as expected. For example I can Get existing shifts without problems:

Below is show access token received from https://login.microsoftonline.com/ endpoint:

Maybe should I add some application permissions? Is my scope https://graph.microsoft.com/.default ok? Maybe here is the problem?
I would be grateful for help.