Set up Microsoft client app for OAuth2
This guide provides instructions to set up a Microsoft client app for the OAuth2 flow. OAuth2 is the industry-standard protocol for authorization, allowing people in your organization to authorize your app to securely access their Microsoft data via API.
Use Sema4.ai Microsoft OAuth2 client
Sema4.ai provides a public Microsoft OAuth2 client, which you can use to authenticate users and access their Microsoft data via API. This means you don't have to set up your own Microsoft OAuth2 client.
Select Use Sema4.ai OAuth2 Client from the dropdown.
Steps to set up Microsoft OAuth2 client
Register an app
- Navigate to the Azure portal (opens in a new tab).
- Select or search for Microsoft Entra ID.

App registration
- Click Add and select App registration in the tool ribbon.

Fill in app information
- Fill in the necessary details for your app:
- Name: Type a name for your app (your users will see this name).
- Supported account types: Select the appropriate account type for your app.
- Redirect URI: Type the redirect URI for your app. This is the URL where users will be redirected after they authenticate. Use
http://localhost:4567
and select Web.
- Click Register to create the app.

Client ID and tenant ID
After registering, you will see the app overview page.
Note down the Application (client) ID and Directory (tenant) ID values. You will need these values later.

Create a client secret
- Click Manage in the left-side menu and select Certificates & secrets.
- Select New client secret.
- Type a name for your secret
- Choose the expiration time according to your organization's policies.

Store the client secret value
After creating the secret, note down the Value. You will need this value later.

Create client in Sema4.ai platform
- In Sema4.ai Studio, navigate to the Settings tab and select Clients.
- Under Microsoft, add the values you stored previously. With the tenant ID, you need to add
https://login.microsoftonline.com/
before the tenant ID.
