I would like to create a backend Node.js aplication in order to manage an Outlook Calendar (Create, delete, update events...). However I want to update the same calendar every time (Always the same account). A global calendar to everyone.
The real pourpose is to integrate this calendar Backend with dialogFlow functionality (Similar to this example in Google Calendar https://github.com/dialogflow/fulfillment-bike-shop-nodejs)
I've been looking to https://learn.microsoft.com/en-us/graph/auth-v2-service, but I don't know if it is the correct aproach to do it.
I created an app in Azure Portal, and got my token:
POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token HTTP/1.1
But can't access to https://graph.microsoft.com/v1.0/users/{id}/calendars. The message I get is similar to this:
"code": "OrganizationFromTenantGuidNotFound",
"message": "The tenant for tenant guid '68cc4dcb-5873-4ea0-a498-fe57e9b5d827' does not exist."
I've been looking to https://learn.microsoft.com/en-us/graph/auth-v2-service, but I don't know if it is the correct aproach to do it.
I think this is feasible.
"code": "OrganizationFromTenantGuidNotFound",
You need to use the user(tonyju@abc.onmicrosoft.com) to access calendars. And this account must have been assigned a O365 license You can refer to this.
Update:
If you just want to access the calendar of your personal account, you can use auth code flow to get the access token. And then use
https://graph.microsoft.com/v1.0/me/calendars