Skip to main content
Connect Microsoft Entra ID and M365 SharePoint to Oleria to see who has access across your Microsoft tenant, how they authenticate, and who can reach your SharePoint and OneDrive content. You can connect with Microsoft OAuth, a client secret, or a client certificate.

What Oleria discovers

  • Users and their profiles, including their authentication methods.
  • Groups and group membership.
  • Applications registered in your tenant.
  • Directory roles and role assignments.
  • Policies - conditional access policies, and entitlement management role assignments.
  • Non-human identities - service principals, agent identities, and agent users, with their credentials and permission grants.
  • Identity risk events, audit log activity, and sign-in logs for users, service principals, and AI agents.
  • SharePoint and OneDrive sites and the items in them, when you connect M365 SharePoint.
  • Agents - when agent discovery is enabled for your workspace, the Agents inventory lists the agents in Microsoft Entra ID and in your Microsoft Agent 365 registry, including Copilot Studio agents. See AI agents.
Microsoft requires a Microsoft Entra ID P1 or P2 license to read sign-in logs and users’ last sign-in. Without one, Oleria still imports your users, service principals, and AI agents, but shows no sign-in activity and no last sign-in date.

Prerequisites

  • A Microsoft Entra ID account with the Global Administrator or Privileged Role Administrator role, to grant admin consent for the application permissions below.
  • Admin access on the Oleria platform to add a new integration.
Standard integrations are configured with read-only permissions. Remediation is optional. To let Oleria take remediation actions, grant the additional write permissions listed below.Use a service account (and not an employee account) with the suggested privileges for the integration to ensure continuity.

Integration approaches

Choose one of three ways to connect:
  1. Connect with Microsoft OAuth - automated configuration. Oleria creates the app and requests consent for you.
  2. Connect with a client secret - manual configuration with an app registration and client secret.
  3. Connect with a client certificate - manual configuration with an app registration and certificate, for security policies that require certificate-based authentication.

Connect with Microsoft OAuth

1

Open the integration

Sign in to your Oleria workspace and select Integrations.
  • Select Microsoft Entra ID to integrate Entra ID, or
  • Select SharePoint & OneDrive to integrate Entra ID, SharePoint, and OneDrive. Select SharePoint & OneDrive to integrate Entra ID, SharePoint, and OneDrive.
A side panel opens.Oleria side panel for connecting SharePoint & OneDrive
2

Choose permission scope

Leave Authentication Method set to Authenticate via Microsoft (OAuth), the default. The screen shows an option to enable write permissions to allow Oleria to perform select remediations. The Oleria remediation feature is optional.The checkbox that lets Oleria take remediation actions is selected when the panel opens. On the SharePoint & OneDrive tile it reads I authorize Oleria to perform write actions in Microsoft 365 (recommended). On the Microsoft Entra ID tile it reads I authorize Oleria to perform write actions in Microsoft Entra ID (recommended). Clear it to keep the standard read-only permissions scope. Then select Authenticate.Oleria integration screen with optional write permissions checkbox for remediations
3

Select your Microsoft account

Select your Microsoft account and complete authentication.
4

Complete the initial consent form

A consent form appears to grant permissions for the Oleria application to view your basic profile and read access. Select the Consent on behalf of your organization checkbox, then complete the consent form by selecting Accept.Microsoft consent form for Oleria application read permissions
5

Complete the application consent form

Microsoft’s application consent form appears with the permissions that the Oleria application for your integration type requests. Each tile has its own Oleria application for an integration without remediation, and another for an integration with remediation. Complete the consent form by selecting Accept.The permissions vary by integration type:
  1. Standard read-only permissions for Entra ID integration (without optional remediations) Permission list on the Microsoft consent form for the Entra ID integration without remediation
  2. Standard read-only permissions for SharePoint and OneDrive integration (without optional remediation) Permission list on the Microsoft consent form for the SharePoint and OneDrive integration without remediation
  3. Permissions for Entra ID integration with optional remediation capabilities (includes some write permissions) Permission list on the Microsoft consent form for the Entra ID integration with remediation, including write permissions
  4. Permissions for SharePoint and OneDrive integration with optional remediation capabilities (includes some write permissions) Permission list on the Microsoft consent form for the SharePoint and OneDrive integration with remediation, including write permissions

Connect with a client secret

1

Create an app registration in Entra ID

Sign in to Microsoft Entra ID, navigate to App registrations, and select New registration.Microsoft Entra ID App registrations page with the New registration button
2

Configure the registration

Give a name to the application (for example, Oleria) and select Single tenant only for your tenant. Select Register.
Oleria connects to one tenant per integration. To connect more tenants, create an app registration in each one, or register the app as Multiple Entra ID tenants, grant admin consent in each tenant, and add a separate Oleria integration per tenant.
Entra ID App Registration with single tenant option selected
3

Open API permissions

Open the application and select Manage -> API permissions. Select Add a permission.Entra ID app registration API permissions page with the Add a permission button
4

Add Microsoft Graph permissions

Select Microsoft Graph and select Application permissions. Search for each permission, select its checkbox, and select Add permissions. Add the permissions appropriate for your integration:Request API permissions panel with Microsoft Graph application permissions selected
  1. Standard read-only permissions for Entra ID integration (without optional remediations)
CopilotPackages.Read.All is used only for AI agents, so you can leave it out of your own app registration if agent discovery isn’t enabled for your workspace. It lets Oleria read your tenant’s Microsoft Agent 365 registry, which includes your Copilot Studio agents. Reading the registry also needs a Microsoft Agent 365 license in your tenant. Where agent discovery is enabled, grant the permission even if your tenant has no license yet: Oleria then reads the registry as soon as the tenant is licensed, with no further consent. Without the permission or the license, Oleria discovers AI agents from Microsoft Entra ID only: agents that only the registry lists are missing, and the others appear without their configuration. See AI agents.MailboxSettings.Read lets Oleria recognize shared, room, and equipment mailboxes, and list them as non-human identities instead of users. Oleria does this only where mailbox classification is enabled for your workspace. Without the permission, these mailboxes stay listed as users.
  1. Standard read-only permissions for SharePoint and OneDrive integration (without optional remediation)
CopilotPackages.Read.All is used only for AI agents, so you can leave it out of your own app registration if agent discovery isn’t enabled for your workspace. See the note after the first list.
  1. Permissions for Entra ID integration with optional remediation capabilities (includes some write permissions)
AgentIdentity.EnableDisable.All is used only by Disable agent and by Disable a non-human identity on an agent identity, and CopilotPackages.ReadWrite.All only by Disable agent, so you can leave them out of your own app registration if you don’t plan to use those actions. CopilotPackages.Read.All and MailboxSettings.Read are used as described after the first list. See AI agents.Each remediation action checks for its own permission before it runs. Every action also needs Application.Read.All (or Application.ReadWrite.All, Directory.Read.All, or Directory.ReadWrite.All), which the read-only permissions above already include. Grant the permissions for the actions you plan to use:The mailbox row applies only where Oleria lists shared, room, and equipment mailboxes as non-human identities. See the note on MailboxSettings.Read after the first list.Disable agent, and Disable a non-human identity on an agent identity or an agent user, are being rolled out. Disable agent is available only where agent discovery is enabled, and Oleria offers it only on an integration that holds every permission in its row. If you plan to use these actions with your own app registration, add their permissions when you set it up, so you don’t have to change the setup when they arrive. See Permissions for disabling AI agents.
Microsoft Graph permissions alone don’t let an app disable, enable, or delete a user who holds a privileged administrator role. To take these actions on administrators, the Oleria app also needs a sufficiently privileged Entra ID administrator role.
  1. Permissions for SharePoint and OneDrive integration with optional remediation capabilities (includes some write permissions)
AgentIdentity.EnableDisable.All, Application.ReadWrite.All, CopilotPackages.ReadWrite.All, and User.RevokeSessions.All are in this list for Disable agent, and CopilotPackages.Read.All is in it for agent discovery. Application.ReadWrite.All and User.RevokeSessions.All also let Oleria disable a non-human identity and revoke a user’s sign-in sessions on the Microsoft Entra ID instance that this integration creates. You can leave any of these five permissions out of your own app registration if you don’t plan to use what it enables. See AI agents.The SharePoint permissions in this list let Oleria take the SharePoint actions in SharePoint and OneDrive. The actions that remove access use a different permission depending on how that access was granted:
5

Grant admin consent

After adding all application permissions, select Grant admin consent (shown as Grant admin consent for followed by your tenant name) to complete the consent.Microsoft Entra ID API permissions page with Grant admin consent button highlighted
6

Confirm admin consent

After admin consent succeeds, each permission shows a green granted status.API permissions list showing each permission with a green granted status after admin consent
7

Create a client secret

Navigate to Certificates & Secrets and select New client secret. Enter a Description, choose an Expires period (the default is Recommended: 180 days (6 months)), and select Add.Certificates & secrets page with the New client secret dialog
8

Copy the client secret value

The generated client secret is shown. Copy its Value. Entra ID never shows the value again after you leave the page.Newly generated client secret with its Value column and copy button
9

Copy the client ID and tenant ID

From the app registration overview, copy the Application (client) ID and Directory (tenant) ID.App registration overview showing the Application (client) ID and Directory (tenant) ID
10

Open the integration in Oleria

Sign in to your Oleria workspace and select Integrations -> SharePoint & OneDrive.Oleria workspace Integrations page with SharePoint & OneDrive selectedA side panel opens.
11

Authenticate with a client secret

Select the Authentication Method dropdown and select Client Secret Authentication.Enter the Client Secret, Tenant Id, and Client Id you copied earlier. To enable remediation actions, leave the remediation checkbox selected. It is selected when the panel opens. On the SharePoint & OneDrive tile it reads I authorize Oleria to perform write actions in Microsoft 365 (recommended). On the Microsoft Entra ID tile it reads I authorize Oleria to perform write actions in Microsoft Entra ID (recommended). Clear it to keep Oleria from taking remediation actions on the integration. Then select Authenticate.Oleria connection form with Client Secret, Tenant ID, and Client ID fields

Connect with a client certificate

Client certificate authentication uses a certificate uploaded to your Oleria app registration in Entra ID and a base64-encoded private key stored by Oleria. Use this method when your security policy requires certificate-based service principal authentication instead of a client secret.
This flow reuses the Oleria app registration and API permissions you create in Connect with a client secret. Complete the steps from Create an app registration in Entra ID through Confirm admin consent, then return here. Skip the Create a client secret step.
1

Prepare your certificate files

Place the following files in a single working directory:
  • certificate.pem - the public certificate in PEM format
  • private_key.txt - the matching unencrypted private key in PEM format
  • certificate_chain.txt - the intermediate certificate chain in PEM format
If your organization does not issue these files through an internal PKI, generate a self-signed certificate using the tooling of your choice (for example, AWS Certificate Manager Private CA or New-SelfSignedCertificate on Windows) and export it in the formats above.
The private key must be unencrypted. If private_key.txt is passphrase-protected, decrypt it to a new file with openssl rsa -in private_key.txt -out private_key_unencrypted.txt (or the equivalent for your key type). Keep the encrypted original, and use private_key_unencrypted.txt wherever the commands below reference private_key.txt.
2

Generate the base64-encoded private key

Oleria expects a single base64 string that decodes to the certificate, chain, and unencrypted private key concatenated as PEM blocks. Run the commands for your operating system from the directory that holds the files prepared in the previous step.
The contents of base64_generate_cert.pem is the value you will paste into Oleria in the final step.
3

Upload the certificate to Entra ID

Sign in to your Entra ID tenant and navigate to Microsoft Entra ID -> Manage -> App registrations. Open your Oleria app registration.
If the app is not visible under Owned applications, switch to All applications and search for it by name.
Select Manage -> Certificates & secrets -> Certificates, select Upload certificate, and upload certificate.pem.Entra ID app registration Certificates and secrets page with Upload certificate button and an uploaded certificate listed
4

Open the integration in Oleria

Sign in to your Oleria workspace and select Integrations.
  • For a new integration, select Microsoft Entra ID or SharePoint & OneDrive to open the side panel.
  • To migrate an existing integration from client secret to client certificate, select Connected, then select the edit icon on your Entra ID integration to open the side panel.
5

Authenticate with the client certificate

From the Authentication Method dropdown, select Client Certificate Authentication.Provide the following:Select Authenticate to save a new integration, or Update if you’re editing an existing one.Oleria Workspace Integrations Connected view with the Update Microsoft Entra ID side panel showing Client Certificate Authentication selected and Tenant Id, Client Id, and Private Key fields
6

Clean up generated files

generated_cert.pem and base64_generate_cert.pem both contain the unencrypted private key inline, as does private_key_unencrypted.txt if you decrypted a passphrase-protected key. Delete them from the working directory now that the integration is connected. Your original certificate.pem, certificate_chain.txt, and private_key.txt files are unchanged and can stay in your existing key store.
If your shell records command history, clear it to remove references to the key file paths: history -c on Bash or Zsh, Clear-History on PowerShell.

How Oleria handles the private key

The Private Key field in the integration form is masked while you enter it. Oleria receives the value over TLS and stores it encrypted at rest. Only the Oleria service that authenticates to Entra ID can read it, and Oleria doesn’t write the private key to logs.

Verify the integration

Whichever approach you used, confirm the Microsoft Entra ID instance, and the Microsoft SharePoint instance if you connected SharePoint & OneDrive, appear on the Connected tab of your Oleria Integrations page with a status of Healthy. After the first sync completes, you can review the discovered users, groups, applications, directory roles, and SharePoint sites in your Oleria workspace. Oleria workspace Connected Integrations showing Entra ID and M365 SharePoint instances

AI agents

When agent discovery is enabled for your workspace, Oleria discovers the AI agents in your Microsoft tenant and shows them in the Agents inventory. To enable agent discovery, contact support@oleria.com.

What Oleria discovers about agents

Oleria reports three types of agent:
  • Agent Identity - an agent that has a Microsoft Entra Agent ID identity.
  • Service Principal - a service principal that Microsoft Entra ID lists as an agent. A Copilot Studio agent created before Agent ID appears this way.
  • Copilot Package - an agent that only your Microsoft Agent 365 registry lists, with no identity of its own in Microsoft Entra ID.
For an agent that is in both Microsoft Entra ID and the registry, Oleria shows one agent and uses the registry’s name for it.

Permissions for agent discovery

Agent discovery uses the read permissions listed in Connect with a client secret. Two of its reads need more than the permission: A missing permission or license doesn’t fail the sync: Oleria reports what it can read. Microsoft offers the Agent 365 registry API in its global cloud only, not in its US Government clouds or in Microsoft Azure operated by 21Vianet. To add CopilotPackages.Read.All to an existing integration, see Add permissions to an existing integration.

Permissions for disabling AI agents

Oleria uses these permissions for the Disable agent action, which is being rolled out. They are listed in the tables for the integration with optional remediation capabilities. If you plan to use the action with your own app registration, add them when you set it up, so you don’t have to change the setup when the action arrives. Oleria offers the action on an integration only when it holds all of these permissions, with User.Read.All. That includes CopilotPackages.ReadWrite.All in a tenant that has no Microsoft Agent 365 license. Disable a non-human identity uses the same permissions on an agent identity (AgentIdentity.EnableDisable.All) and on an agent user (User.EnableDisableAccount.All, User.Read.All, and User.RevokeSessions.All). Those two targets are also being rolled out. To add these permissions to an existing integration, see Add permissions to an existing integration.

Add permissions to an existing integration

You add permissions to an existing integration in Microsoft Entra ID, without reconnecting it in Oleria. For an integration that connected with Authenticate via Microsoft (OAuth), a tenant administrator grants admin consent again to the Oleria application the integration connected with. Microsoft then grants the permissions that application requests, and the integration keeps its application and its connection.
1

Open the Oleria application

Sign in to the Microsoft Entra admin center with one of the roles in Prerequisites. Cloud Application Administrator, Application Administrator, and AI Administrator can’t grant consent to Microsoft Graph application permissions. Browse to Entra ID -> Enterprise apps -> All applications and search for Oleria.The Oleria application an OAuth integration connected with is registered in Oleria’s own tenant, so your tenant lists it under Enterprise apps only. An app registration your organization created in this tenant, such as one for a client secret or a client certificate, is also listed under Entra ID -> App registrations -> All applications. Leave out any search result whose Application ID is the Application (client) ID of one of those app registrations.Each tile has its own Oleria application for an integration without remediation, and another for an integration with remediation. If more than one result is left, open each one’s Security -> Permissions and select the Admin consent tab. The applications for SharePoint & OneDrive hold Sites.Read.All (Read items in all site collections), and the applications with remediation hold User.EnableDisableAccount.All (Enable and disable user accounts). The application for Microsoft Entra ID without remediation holds neither. Select the one for your integration.
2

Open its permissions

Select Permissions under Security.
3

Grant admin consent

Select Grant admin consent (shown as Grant admin consent for followed by your tenant name). The consent window that opens shows the application’s publisher. Oleria’s applications show Oleria Corporation with Microsoft’s blue verified badge. If the window shows another publisher, or Unverified, select Cancel and go back to the first step. Otherwise, review the permissions and select Accept.
4

Check the permissions

On Permissions, the Admin consent tab lists the permissions granted to the application for your whole organization. Check that it lists CopilotPackages.Read.All (Read all packages information).
For an integration that uses your own app registration, with a client secret or a client certificate, add the permissions in the two sections above to the app registration and grant admin consent again, as in the Add Microsoft Graph permissions and Grant admin consent steps. After either, Oleria uses CopilotPackages.Read.All from the next sync. It checks the integration’s permissions for remediation actions again on the next sync, and it can take about a day before it offers an action that needed them. Oleria refuses write actions, including Disable agent, on an integration saved with the remediation checkbox cleared, except to revert an action it already ran. An integration with no choice saved, such as one connected before the checkbox existed, isn’t refused. To turn remediation on or off for an existing integration, contact support@oleria.com.

Verify agent discovery

After the next sync completes, open the Agents inventory and filter Application Instance to your Microsoft Entra ID integration. If Copilot Studio agents are missing, or appear without their configuration, check that the integration holds CopilotPackages.Read.All and that your tenant has a Microsoft Agent 365 license.

Remediation actions

If you granted the optional remediation permissions, Oleria can take these actions in Microsoft Entra ID. Each action needs the permission listed in the Add Microsoft Graph permissions step.
  • Enable or disable a user
  • Add or remove a user from a group
  • Add or remove a user from a directory role
  • Assign or unassign a user to an application
  • Assign or remove a group’s access to an application
  • Disable a non-human identity: a service principal, or a shared, room, or equipment mailbox that Oleria lists as a non-human identity
  • Disable a non-human identity: an agent identity or an agent user (being rolled out)
  • Disable agent (being rolled out). See Permissions for disabling AI agents.
  • Create a user
  • Delete a user
  • Revoke a user’s sign-in sessions
Disable a non-human identity isn’t offered for a managed identity, or for the account Microsoft Entra Connect signs in with to synchronize your on-premises directory. Oleria disables a system-assigned managed identity through the Azure integration. Disable a non-human identity and Disable agent disable an account in Microsoft Entra ID the same way:
  • Refused accounts: Oleria refuses to disable the service principal the integration signs in with, an Oleria application’s service principal, a Microsoft first-party application’s service principal, a service principal that Microsoft has disabled, and an agent identity blueprint’s service principal, which every agent created from the blueprint shares.
  • Not confirmed yet: If Microsoft Entra ID accepts the disable but doesn’t show the change yet, the action succeeds, and the row’s Reason in Action Center starts with “Not confirmed yet”.
  • Revert: Revert enables only an account the action disabled. If Microsoft Entra ID doesn’t answer the request that enables the account, the revert fails and the account may still be disabled. Check the account in the Microsoft Entra admin center.

SharePoint and OneDrive

If you connected SharePoint & OneDrive and granted the SharePoint remediation permissions, Oleria can also take these actions. The permissions each one needs are in the Add Microsoft Graph permissions step of Connect with a client secret. On a file or list item, the actions that remove access remove only permissions granted directly to the account. They refuse a permission that comes from a sharing link, because deleting the link removes access for everyone who uses it. Remove the link in SharePoint instead. They also refuse access the account has through a group. The only links Oleria deletes are anonymous links, with Revoke anonymous access to resource instance. If a file or list item also has an anonymous link, removing a named account’s access fails: Oleria deletes the account’s direct permissions first, then refuses the anonymous link, so the action reports a failure after the direct permissions are already gone. Revoke the anonymous link first with Revoke anonymous access to resource instance.

Check the Oleria app in your Entra ID instance

1

Find the Oleria app in Enterprise applications

Sign in to your Entra ID instance, navigate to Enterprise applications -> select All applications.Search for Oleria to find the Oleria application in the Enterprise applications list.Entra ID Enterprise applications list showing the Oleria application
2

View granted permissions

Open the Oleria application and select Security -> Permissions to view the read permissions granted to the Oleria application.Oleria enterprise application Permissions page listing the granted read permissions

Contact us

For questions about this integration, contact us at support@oleria.com.