Skip to main content
Onyx reads Microsoft 365 through three connectors: SharePoint, which also covers OneDrive, Microsoft Teams and Outlook. All three sign in to Microsoft Graph as an application registered in Microsoft Entra, not as a user, and they are set up the same way: register an application, grant it permissions, give Onyx a credential. This page holds those shared steps. Each connector’s page says what it needs beyond them. One app registration can serve every connector. Grant it the union of the permissions in the table below, or register one app per connector to keep the grants apart.

Before you begin

You need:
  • A Microsoft 365 tenant
  • A Microsoft Entra user account holding the Global Administrator or Privileged Role Administrator role. The connectors need Microsoft Graph application permissions, and only these two roles can consent to those on behalf of your organization. Application Administrator and Cloud Application Administrator can register the app but cannot grant it consent.
  • An Onyx administrator account
  • A decision on how the connector authenticates, a client secret or a certificate. Changing it later means building a new credential and possibly re-indexing.
Some options need more: a Teams administrator for meeting transcripts, described on the Teams page, and a SharePoint or Global Administrator when you limit the app to specific sites.

Choose an authentication method

Every connector accepts either a client secret or a certificate.
Use a certificate if you need SharePoint permission sync or Teams channel files, or if your organization does not permit client secrets. Otherwise a client secret is quicker to set up.
SharePoint will not release its permission data, or the readers of a channel’s files, to an application that signed in with a secret, whatever permissions you grant it.

Permissions

Every permission on this page is an Application permission and read only, with one exception: Sites.FullControl.All on the SharePoint API. SharePoint shows an item’s access list only to an app with full control of the site. Onyx reads with it and never writes to SharePoint.
A new registration already lists a delegated User.Read permission. The connectors never use it, since they sign in as an application rather than as a person. Leave it or remove it, as you prefer.

Register the application

1

Create the registration

Sign in to the Microsoft Entra admin center or the Azure portal (https://entra.microsoft.us for GCC High or DoD) and go to App registrations. Select New registration, name it something recognizable, such as Onyx Microsoft 365 Connector, leave the supported account types and redirect URI at their defaults, and select Register.
2

Record the two IDs

On the application’s Overview page, copy the Application (client) ID and the Directory (tenant) ID. Onyx asks for both, and the application access policy for Teams meeting transcripts needs the client ID.

Grant permissions

The permissions come from two places in the portal, Microsoft Graph and SharePoint. Add them all first, then grant consent once at the end.
1

Add the Microsoft Graph application permissions

Go to API permissions → Add a permission → Microsoft Graph → Application permissions, and add every Graph permission from the table above for the connectors and options you plan to turn on. Select Add permissions.Add the grants for an option now if you expect to turn it on later, or come back and add them when you do. To limit the app to specific SharePoint sites, add Sites.Selected instead of Sites.Read.All. See Limiting the app to specific sites.
2

Add the SharePoint application permissions

Needed for SharePoint permission sync and for Teams Include Attachments. Select Add a permission → SharePoint → Application permissions, and add Sites.FullControl.All. SharePoint permission sync also needs User.Read.All here, to match access lists to the people in your directory.Add these under SharePoint, not Microsoft Graph. The two list permissions with the same names, and adding the Graph one by mistake is a common cause of permission sync failing later.
3

Grant admin consent

Select Grant admin consent for <your organization> and confirm. Every permission in the list should then show Granted. Until you do this, none of them take effect. Grant consent again each time you add a permission later.This step needs the Global Administrator or Privileged Role Administrator role. No other role can consent to Microsoft Graph application permissions, so if the button is unavailable or consent fails, ask someone with one of those roles to do it.
Microsoft applies a new permission or consent within minutes, but not everywhere at once. It can take about half an hour before every sign-in carries the new permissions, so the same check in Onyx can pass and then fail. Wait and retry before you change anything else.

Create the credential

Client secret

1

Open Certificates & secrets

In your app registration, go to Certificates & secrets → Client secrets.
2

Add a secret

Select New client secret, give it a description, and choose an expiry. Microsoft allows up to 24 months. Select Add.
3

Copy the value immediately

Copy the Value column, not the Secret ID. The value is shown only while you stay on this page. Once you navigate away you cannot get it back, and you have to create a new secret.

Certificate

A certificate identifies the Entra application with a key file instead of a password. You need two files, and both come from the same certificate:
  • A public certificate (.cer, .pem, or .crt) that you upload to Entra ID
  • A .pfx file, protected by a password, that you upload to Onyx
Sending the wrong file to the wrong place is the most common problem in this setup. Either get a certificate from your organization’s certificate authority, or create a self-signed one.
1

Generate the private key and certificate

2

Package the private key as a .pfx

You are prompted for an export password. Set one and record it: Onyx does not accept an empty password, asks for it later, and cannot recover it.
3

Check what you have

Store the .pfx and its password securely.
4

Upload the public certificate to Entra

In your app registration, go to Certificates & secrets → Certificates, select Upload certificate, choose onyx-m365.crt, add a description, and select Add.
If your certificate authority issues you a .pfx only, extract the public half for Entra with openssl pkcs12 -in yourcert.pfx -clcerts -nokeys -out yourcert.crt.
Entra takes .cer, .pem, and .crt files only. Uploading the .pfx fails with Upload a certificate (public key) with one of the following file types: .cer, .pem, .crt. The .pfx goes to Onyx, not to Entra.

Enter the credential in Onyx

Each connector asks for a credential when you add it. Select an existing credential from the list, or select Create New, pick the tab for your authentication method, and enter the details from your app registration:
  • Client Secret tab: the Application (client) ID, the Directory (tenant) ID and the secret Value you copied
  • Certificate Authentication tab: the two IDs, the .pfx in the Private Key (PFX) field and the export password you set in the Certificate Password field. Each field is labelled with the connector’s name.
Onyx keeps credentials per connector type, so the list on the SharePoint form shows SharePoint credentials only. To use one app registration for several connectors, enter the same IDs and secret or certificate once per connector.

Limiting the app to specific sites

By default the app holds Sites.Read.All, which lets it read every SharePoint site in the tenant, even when a connector names only one. If that is too broad, grant Sites.Selected instead and authorize the app one site at a time. The app can read nothing until you do. This applies to both authentication methods, to a user’s OneDrive, which is a site of its own, and to the SharePoint sites behind Teams channel files. The role you grant depends on what the connector does: Permission sync and Teams channel files need fullcontrol because SharePoint shows an item’s access list only to an app that has full control of the site. Onyx never writes to SharePoint.
You need a Global Administrator or SharePoint Administrator account. The steps below use Microsoft Graph Explorer. You can do the same with PnP PowerShell (Grant-PnPAzureADAppSitePermission).
1

Sign in and consent

Sign in to Graph Explorer, then select your profile icon → Consent to permissions and enable Sites.FullControl.All. This lets Graph Explorer grant site permissions. It grants nothing to your Onyx application.
2

Find the site ID

Run a GET request, substituting your tenant and site name:
For a OneDrive, the site is contoso-my.sharepoint.com:/personal/jane_contoso_com. Copy the id from the response. It is a three-part value such as contoso.sharepoint.com,5a58bb09-…,9f2ec1da-….
3

Grant the role

Change the method to POST, using the site ID you just copied:
Send this body. Set roles to ["read"] for indexing only, or ["fullcontrol"] for permission sync. Set id to your Onyx application’s Application (client) ID.
A successful grant returns 201 Created.
4

Verify

Change the method back to GET on the same URL, and confirm the role you granted appears against your application.
Repeat the last three steps for every site the connector indexes.

National clouds

Each connector has Authority Host and Graph API Host under its advanced settings, and the SharePoint connector has SharePoint Domain Suffix as well. All must describe the same cloud. Onyx rejects an authority host that does not match the Graph host when you save, and corrects a domain suffix that does not match the Graph host with a warning in its log.

Rotating the secret or certificate

Indexing stops when the secret or certificate expires. To rotate without downtime:
1

Add the new one alongside the old

In Certificates & secrets, add a new client secret and copy its value, or upload the new public certificate. Entra holds more than one at a time, and both work until the old one expires.
2

Update the credential in Onyx

In Admin Panel → Existing Connectors, open the credential of each connector that uses this app registration and replace the secret value, or the .pfx and its password.
3

Delete the old one

Once an indexing attempt has succeeded, delete the previous secret or certificate in Entra.

Troubleshooting

Credential, consent and certificate problems, with the message each connector shows for them. Each connector’s page lists the problems that are its own.
Entra does not recognize the secret or certificate, or it belongs to another app registration. For a secret, check that you copied the Value rather than the Secret ID, and that it has not passed its expiry date. For a certificate, it has usually expired, or the .pfx and the uploaded public certificate came from different certificates. Create a new one and update the credential.
The directory ID or the authority host is wrong. For a national cloud, set every host from the same row of National clouds.
You uploaded the .pfx to Entra. Upload the .crt, .cer, or .pem instead, and keep the .pfx for Onyx.
Onyx could not open the .pfx, usually because the password is wrong or the file is not a .pfx at all. Repeat Certificate.
SharePoint permission sync or Teams channel files are running on a client secret credential, and SharePoint will not release permission data to an app that signed in with a secret. Check which credential the connector is attached to, and rebuild it with a certificate.
Admin consent was never given, or was given before you added the last permission. Select Grant admin consent again.
The permission was added on the wrong API. SharePoint checks its own Sites.FullControl.All, and a Graph permission with the same name does not count.
Microsoft is still applying a permission, consent or application access policy change. Wait about half an hour and retry before you change anything else.
The secret or certificate expired. See Rotating the secret or certificate.