Client Secret Authentication
Client secret authentication uses traditional Azure App Registration credentials to connect to SharePoint.
This method is suitable for most basic SharePoint integrations.
Note: Permission sync is not available with client secret authentication.
Use certificate-based authentication
if you need permission sync functionality.
Setting up
Step 1: Create Azure App Registration
More detailed instructions can be found following the video below.
Open App registrations
Navigate to “App registrations” using the search bar.
Create registration
Click New Registration.
Name and register app
Name it something like “Onyx SharePoint Connector”, leave everything else as default, and click Register.
Save IDs
Under “Essentials” in the overview tab, you will find the Application (client) ID and Directory (tenant) ID.
Save those for later.
Step 2: Create Client Secret
Open Certificates & secrets
Navigate to the “Certificates & secrets” tab in Azure Portal.
Create secret
Click New client secret.
Set expiration
Fill out the description, set the expiration to 24 months, and click Add.
Copy secret value
Copy the secret value in the Value column for later.
Important: Make sure to copy the secret value immediately as it won’t be visible again.
Two separate API permissions are required:
Despite its name, Sites.FullControl.All is read-only in Onyx. No write operations are performed.
Open API Permissions
Navigate to the “API Permissions” tab in the Azure Portal.
Add Microsoft Graph permission
Click Add a permission → Microsoft Graph → Application permissions.Navigate to the “Sites” permission group and select Sites.Read.All.
- Advanced: If you want to limit the sites this app has access to, select Sites.Selected.
However, if you do this, you will need to add the App you are currently registering to each site you want to index.
How to grant site-specific access
If you selected Sites.Selected, you need to grant your app read access to each site you want to index.The steps below use Microsoft Graph Explorer,
but you can also grant site permissions using:To use Graph Explorer, complete these steps:Sign in
Sign in with a Global Admin or SharePoint Admin account.
Consent to permissions
Click your profile icon → Consent to permissions → enable Sites.FullControl.All.
This grants Graph Explorer (not your Onyx app) permission to manage site access.
Get the site ID
Run a GET request, replacing {tenant} and YourSiteName:Copy the id from the response (format: contoso.sharepoint.com,guid1,guid2). Grant Read permission
Change the method to POST:Request body: Verify
Change the method to GET:Confirm "roles": ["read"] appears for the Onyx app. Repeat steps 3–5 for each site you want to index. Click Add permissions. Add SharePoint permission
Click Add a permission again → SharePoint → Application permissions.Navigate to the “Sites” permission group and select Sites.FullControl.All.Click Add permissions.
Grant admin consent
Click Grant admin consent for <Organization name> (located next to Add a permission)
and click Confirm.
Open SharePoint connector
Navigate to the Onyx Admin Panel and select the SharePoint Connector.
Create Client Secret credential
Click Create New credential and select the Client Secret tab.
Enter credential details
- Application (client) ID from Step 1
- Directory (tenant) ID from Step 1
- Client Secret Value from Step 2
Save credentials
Click Create to save your credentials.
For permission sync capabilities,
consider using certificate-based authentication.