Can't authorize teams and outlook

Describe the problem/error/question

Hello, community. I have a problem that I’ve been racking my brains over for two weeks now. I can’t log into my Outlook to read emails using n8n. Likewise, I don’t have direct access to Microsoft Entra, and my Azure administrators are asking me to provide a list of specific access rights that need to be added to my application. Please help me understand how the application should be configured correctly.

There is list of already granted permissions at API permissions:

image

Permissions Enterprise Application:

What is the error message (if any)?

Information on your n8n setup

  • n8n version: Version 2.2.5
  • Database (default: SQLite): sqlite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): not sure, probably default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker, hostinger
  • Operating system: server ubuntu, I’m on mac os

hello @JSA

These permissions are required for the Outlook App:

openid,
offline_access,
Contacts.Read,
Contacts.ReadWrite,
Calendars.Read,
Calendars.Read.Shared,
Calendars.ReadWrite,
Mail.ReadWrite,
Mail.ReadWrite.Shared,
Mail.Send,
Mail.Send.Shared,
MailboxSettings.Read

and make sure you are not using the /common/ in the access token or authorization URLs. Use your tenant ID (you can find it in the app home page in Entra) instead of common

@barn4k thank you! Will try this today and come back with result ASAP.

Also, maybe you know the list of permissions for Teams and Sharepoint too?

Should I add them here? And what type they should be: delegated or application?

I’ve change common to tenant ID and add all permissions you’ve listed. Still have same error. Any other ideas? @barn4k

My suggestion is that these permissions should be under the admin consent instead of the user consent.

And check that you are providing the Application ID as the Client ID. Not the Object ID

Teams:

openid
offline_access
User.Read.All
Group.ReadWrite.All
Chat.ReadWrite
ChannelMessage.Read.All

For the SharePoint, I see only these:

openid
offline_access 

Application ID work, you know strange thing about app, it’s work prefect with excel connection. But outlook and teams can’t be connected to n8n. Will make deep dive to a problem on Monday with Azure admins, I will bring solution if it will be founded. Cheers!