Skip to content

The open alternative to Salesforce, designed for AI.

docs: list the Microsoft scopes Twenty actually requests (#27904)

neo773df1e3f0f0ee6
diff --git a/packages/twenty-docs/developers/self-host/capabilities/setup.mdx b/packages/twenty-docs/developers/self-host/capabilities/setup.mdx
index 24a0669c821..3d7bb1176e5 100644
--- a/packages/twenty-docs/developers/self-host/capabilities/setup.mdx
+++ b/packages/twenty-docs/developers/self-host/capabilities/setup.mdx
@@ -193,7 +193,7 @@ On Microsoft Azure Console enable the following APIs in "Permissions":
- Microsoft Graph: Mail.ReadWrite
- Microsoft Graph: Mail.Send
-- Microsoft Graph: Calendars.Read
+- Microsoft Graph: Calendars.ReadWrite
- Microsoft Graph: User.Read
- Microsoft Graph: openid
- Microsoft Graph: email
@@ -201,11 +201,11 @@ On Microsoft Azure Console enable the following APIs in "Permissions":
- Microsoft Graph: offline_access
<Note>
-"Mail.ReadWrite" and "Mail.Send" are only mandatory if you want to send emails using our workflow actions. You can use "Mail.Read" instead if you only want to receive emails.
+All of these permissions are required, even if you only want to sync emails and calendar events. Twenty always requests "Mail.ReadWrite", "Mail.Send" and "Calendars.ReadWrite" when a user connects their account, so read-only permissions like "Mail.Read" or "Calendars.Read" are not enough.
</Note>
<Note>
-"Calendars.ReadWrite" is mandatory if you want to create calendar events using our workflow actions. If you want to only sync calendar events, use "Calendars.Read".
+If your tenant does not let regular users consent to these permissions, they will see error AADSTS90094 when connecting their account. An administrator can fix this by clicking "Grant admin consent for {your-tenant}" in the app registration's "API permissions" page.
</Note>
### Authorized redirect URIs
@@ -232,14 +232,15 @@ You need to add the following redirect URIs to your project:
</Warning>
### Configure scopes
-[See relevant source code](https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/core-modules/auth/utils/get-microsoft-apis-oauth-scopes.ts#L2-L9)
+[See relevant source code](https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/core-modules/auth/utils/get-microsoft-apis-oauth-scopes.ts#L2-L11)
- 'openid'
- 'email'
- 'profile'
- 'offline_access'
- 'Mail.ReadWrite'
- 'Mail.Send'
-- 'Calendars.Read'
+- 'Calendars.ReadWrite'
+- 'User.Read'
### If your app is in test mode