Skip to main content

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.

Which setup is this?

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.

Tell us what you need, and we’ll build the request.

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.

Permissions to request from IT

App registration: Microsoft 365 parent identity app

Microsoft Graph API Application
  • 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.

  1. Sign in to the Azure portal.

  2. Select Microsoft Entra ID → Manage → App registrations → New registration.

  3. On the Register an application page, register an app with the following:

    FieldValue
    NameGlean
    Supported account typesAccounts in this organizational directory only (Single tenant)
    Redirect URILeave this field blank
  4. Select Register.

Configure permissions​

  1. On the overview page, select Manage → API Permissions.
  2. Select Add a permission, then choose Microsoft Graph.
  3. Choose Application permissions and add the following:
    • User.Read.All
    • GroupMember.Read.All
    • Reports.Read.All
    • Member.Read.Hidden
note

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.

  1. Sign in to Azure as a Global Administrator.
  2. Use the search box to navigate to Enterprise applications.
  3. Select the Glean app you created.
  4. Select Permissions under Security.
  5. 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:

  1. Download the relevant OpenSSL installation manager for your version of Windows. OpenSSL offers a list of third-party binary distributions.
  2. During the installation process, select the option to copy the OpenSSL binaries into the /bin directory.
  3. 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 CERTIFICATE and end with END CERTIFICATE.
  • The private key should begin with BEGIN PRIVATE KEY and end with END PRIVATE KEY. It should not include RSA in the headers, nor be encrypted.

Upload certificate to Azure​

  1. Navigate back to Microsoft Entra ID → Manage → App registrations and select the app you created.
  2. Select Manage → Certificates & secrets.
  3. Select the Certificates tab and then Upload certificate.
  4. Upload the certificate.crt file you generated.

Upload certificate

Fill out keys in Glean​

  1. In Azure, select Overview for the identity app.
  2. Copy the following values from the Essentials panel and enter them on the Microsoft 365 connector in Glean:
    • Application (client) ID
    • Directory (tenant) ID
  3. Upload certificate.crt in Glean under Client Certificate.
  4. Upload privatekey.key in Glean under Private Key.
  5. Select your tenant size in Glean.
  6. Select Save to create the Microsoft 365 suite.
Existing additional apps

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​