I need to use the MS Graph API to retrieve calendar data for Office365 resources. We need to do this in a server app, so prior consent is needed. I created an app registration in the Azure Portal that provides API permissions for Calendars.read, Calendars.read.shared, Users.Read.All, among other permissions. Admin permission has been granted for all. A client secret was created to support token issue.
I am successful in obtaining a token, but when I use the token to read a resource calendar (or even my calendar,)
I receive the following error:
"code": "NoPermissionsInAccessToken",
"message": "The token contains no permissions, or permissions can not be understood."
URL for GET request is something similar to the following: https://graph.microsoft.com/v1.0/users/conferenceroom1@contoso.com/calendar
What's the proper to set up a registration and use keys/secrets to read graph api data for resource mailbox calendar events?