Microsoft 365 setup
Set up the Microsoft 365 parent connector for identity crawling. Then configure SharePoint and OneDrive with their own app registrations and certificate credentials. Both child connectors inherit the parent's directory tenant ID.
These instructions apply to existing Glean deployments that use the previous Microsoft 365 setup flow. The setup path depends on your deployment's unified setup eligibility, not on when Microsoft 365 was connected. Connectors configured this way keep working, and there is no migration to run. If you are on a new Glean deployment, see Choose your setup.
If a connector's setup shows inherited credentials instead of editable fields, keep the existing shared app and manage its credentials on Microsoft 365. You don't need to recreate working connections or replace their registrations.
Request all suite permissions upfront
Request approval for the identity app and the content apps together, but keep each app's permissions separate. The Microsoft 365 app needs identity permissions. SharePoint and OneDrive each need content permissions on their own registration.
Include the permissions for each connector you plan to use in your approval request, then grant admin consent separately for each app registration. See SharePoint permissions and OneDrive permissions.
For an existing shared-credential connection, apply the relevant permissions to the app shown in that connection's setup. Don't create replacement apps solely to follow this list.
Outlook and Teams use separate registrations and aren't part of this permission request. See Outlook overview and Microsoft Teams overview.
The baseline permissions are always included. Select any extras below and the permission set updates instantly. Then copy it to hand to your IT or security team, so every scope is requested in one pass.
This request covers the Microsoft 365 parent identity app. Request content permissions separately for each service app. Outlook and Teams keep their own app registrations. If your existing child setup inherits parent credentials, follow that displayed flow. Do not recreate a working connection. SharePoint permissions. OneDrive permissions. OneNote setup. Outlook setup. Teams setup.
App registration: Microsoft 365 parent identity app
User.Read.AllEnumerates tenant users to map Microsoft 365 identities to Glean and enforce document-level permissions.GroupMember.Read.AllResolves group membership so group-based permissions are applied correctly.Member.Read.HiddenResolves hidden-visibility group membership, used when confidential groups share content.Reports.Read.AllReads Microsoft 365 usage reports across your tenant.
Required permissions for setup
Use a Global Administrator account for this setup procedure.
Register a new app
Register the identity app for the Microsoft 365 parent. Register content apps later in each child connector's setup.
-
Sign in to the Azure portal.
-
Select Microsoft Entra ID → Manage → App registrations → New registration.
-
On the Register an application page, register an app with the following:
Field Value Name GleanSupported account types Accounts in this organizational directory only (Single tenant) Redirect URI Leave this field blank -
Select Register.
Configure permissions
- On the overview page, select Manage → API Permissions.
- Select Add a permission, then choose Microsoft Graph.
- Choose Application permissions and add the following:
User.Read.AllGroupMember.Read.AllReports.Read.AllMember.Read.Hidden
These four permissions belong on the identity app. Add SharePoint and OneDrive content permissions to their respective apps, not to this app, when using separate child credentials. See Request all suite permissions upfront.
Grant admin consent
- Sign in to Azure as a Global Administrator.
- Use the search box to navigate to Enterprise applications.
- Select the Glean app you created.
- Select Permissions under Security.
- Review the permissions shown, then select Grant admin consent.
Set up certificate authentication
Glean uses app-only credentials to authenticate to Microsoft Graph and SharePoint APIs for Microsoft 365 connectors.
Use this procedure to generate a certificate and private key for the identity app. When setting up SharePoint or OneDrive, follow the same procedure for the relevant content app and upload its credentials to that connector. Before uploading the files, make sure the private key is unencrypted, uses the PKCS#8 format with PEM encoding, and has BEGIN PRIVATE KEY / END PRIVATE KEY headers.
Generate with OpenSSL
Install OpenSSL
macOS includes OpenSSL by default. On Windows, set up OpenSSL for PowerShell:
- Download the relevant OpenSSL installation manager for your version of Windows. OpenSSL offers a list of third-party binary distributions.
- During the installation process, select the option to copy the OpenSSL binaries into the
/bindirectory. - Open a new PowerShell instance and run the following command to make OpenSSL binaries available:
$env:Path += ";C:\\Program Files\\OpenSSL-Win64\\bin"
Generate certificate and private key
Run the following commands line by line. Microsoft SDK requires the certificate to be verified with a private key in PKCS#8 syntax.
openssl genrsa -out tempprivatekey.key 2048
openssl pkcs8 -topk8 -inform PEM -outform PEM -in tempprivatekey.key -out privatekey.key -nocrypt
openssl req -new -key privatekey.key -out request.csr
openssl x509 -req -days 365 -in request.csr -signkey privatekey.key -out certificate.crt
Verify that both certificate.crt and privatekey.key exist. Open each file and confirm the formats:
- The certificate file should start with
BEGIN CERTIFICATEand end withEND CERTIFICATE. - The private key should begin with
BEGIN PRIVATE KEYand end withEND PRIVATE KEY. It should not includeRSAin the headers, nor be encrypted.
Upload certificate to Azure
- Navigate back to Microsoft Entra ID → Manage → App registrations and select the app you created.
- Select Manage → Certificates & secrets.
- Select the Certificates tab and then Upload certificate.
- Upload the
certificate.crtfile you generated.

Fill out keys in Glean
- In Azure, select Overview for the identity app.
- Copy the following values from the Essentials panel and enter them on the Microsoft 365 connector in Glean:
- Application (client) ID
- Directory (tenant) ID
- Upload
certificate.crtin Glean under Client Certificate. - Upload
privatekey.keyin Glean under Private Key. - Select your tenant size in Glean.
- Select Save to create the Microsoft 365 suite.
Don't register extra apps for crawl speed. If additional apps are already configured, keep them in place and maintain their permissions and credentials on the connector that owns them. This doesn't change the required Microsoft 365 identity app or the SharePoint and OneDrive content apps.
For recently created or updated content, use Data fetching to supplement indexed results. It requires end-user authentication and doesn't apply sensitivity-label indexing exclusions. Review the setup requirements and limitations in Real-time access for OneDrive and Set up real-time access for SharePoint.
Next steps
After saving the Microsoft 365 suite, set up each child connector with its own app's client ID, certificate, and private key. The tenant ID remains on the Microsoft 365 parent. Grant content permissions and admin consent on the corresponding child app.
See also
- Choose your Microsoft 365 setup shows which setup is yours and how the suite fits together.
- Microsoft 365 overview explains how the suite works and which child connectors it covers.