Skip to content

Reference

Microsoft

Set up Microsoft OAuth for Office 365, Outlook, OneDrive, and Azure services

Connect your users to Microsoft for Office 365, Outlook email, OneDrive files, Teams, Calendar, and Azure services.

PropertyValue
Provider IDmicrosoft
CategoryProductivity
PKCESupported
Token refreshAutomatic
Redirect URIShown in Developer Portal

Go to App registrations in the Microsoft Entra admin center

Navigate to App registrations in the Microsoft Entra admin center and sign in with your Microsoft account.

Register a new application

Click New registration. Enter an application name and select Accounts in any organizational directory and personal Microsoft accounts.

Configure the redirect URI

Under Authentication, click Add a platform > Web. Add the Alter callback URL from the Developer Portal as the redirect URI.

Create a client secret

Go to Certificates & secrets > New client secret. Set an expiry and copy the Value immediately — it’s only shown once.

Get credentials

Copy the Application (client) ID from the Overview page. The secret you copied is your Client Secret.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Microsoft provider

Go to OAuth Providers > Add Provider > Microsoft.

Enter credentials

  • Client ID: Paste the application (client) ID
  • Client Secret: Paste your client secret Value

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
openidSign in with OpenID Connect
profileAccess to basic user profile
emailAccess to user email address
offline_accessMaintain access with a refresh token
User.ReadRead user profile
User.ReadWriteRead and update user profile
Mail.ReadRead user email messages
Mail.SendSend email on behalf of user
Calendars.ReadRead user calendar events
Calendars.ReadWriteRead and create calendar events
Files.ReadRead user files in OneDrive
Files.ReadWriteRead and write user files in OneDrive
  • Always include offline_access to receive a refresh token for long-lived access.
  • Microsoft requires admin consent for certain organizational scopes.
  • See the Microsoft OAuth 2.0 documentation for more details.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
me/send-mailsendPOST/v1.0/me/sendMail
chats/messages/createsendPOST/v1.0/chats/{chat-id}/messages
teams/channel-messages/createsendPOST/v1.0/teams/{team-id}/channels/{channel-id}/messages
me/getreadGET/v1.0/me
me/messages/listreadGET/v1.0/me/messages
me/messages/getreadGET/v1.0/me/messages/{message-id}
me/mail-folders/listreadGET/v1.0/me/mailFolders
me/calendars/listreadGET/v1.0/me/calendars
me/calendar-viewreadGET/v1.0/me/calendarView
me/events/listreadGET/v1.0/me/events
me/events/createwritePOST/v1.0/me/events
me/contacts/listreadGET/v1.0/me/contacts
me/contacts/createwritePOST/v1.0/me/contacts
me/chats/listreadGET/v1.0/me/chats
me/joined-teamsreadGET/v1.0/me/joinedTeams
teams/channels/listreadGET/v1.0/teams/{team-id}/channels
me/drive/root-childrenreadGET/v1.0/me/drive/root/children
me/drive/items/downloadreadGET/v1.0/me/drive/items/{item-id}/content
me/drive/items/uploadwritePUT/v1.0/me/drive/items/{item-id}/content
drives/items/getreadGET/v1.0/drives/{drive-id}/items/{item-id}
me/todo/listsreadGET/v1.0/me/todo/lists
me/todo/tasks/listreadGET/v1.0/me/todo/lists/{todoTaskList-id}/tasks
me/todo/tasks/createwritePOST/v1.0/me/todo/lists/{todoTaskList-id}/tasks
users/listreadGET/v1.0/users
users/getreadGET/v1.0/users/{user-id}
groups/listreadGET/v1.0/groups
sites/rootreadGET/v1.0/sites/root
sites/listsreadGET/v1.0/sites/{site-id}/lists

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.