Microsoft Entra ID
Trustle reads users, groups, group members, directory roles, app roles, service principals, audit logs, and the apps each user consented to from Microsoft Entra ID. Trustle can add and remove group members, directory roles, and app roles, delete users, and revoke apps that a user consented to.
Prerequisites
Section titled “Prerequisites”- A Microsoft Entra account with the Global Administrator or Privileged Role Administrator role. Only these roles can grant admin consent for Microsoft Graph application permissions.
- Microsoft Entra ID P1 or P2, only for last-used dates. Without it, Trustle cannot read sign-in logs.
- To read Azure subscriptions too, use this app registration and this connection. Do the extra steps on the Azure page. Do not create a second app registration.
Configure Microsoft Entra ID
Section titled “Configure Microsoft Entra ID”Step 1: Register an app
Section titled “Step 1: Register an app”-
In the Microsoft Entra admin center, go to Applications → App registrations.
-
Click New registration.

-
Enter a Name, for example
Trustle. -
In Supported account types, select Accounts in this organizational directory only (single tenant).
-
Leave Redirect URI empty. Click Register.

-
The app Overview page opens. It shows the Application (client) ID and the Directory (tenant) ID. You need both in Step 4.

Step 2: Create a client secret
Section titled “Step 2: Create a client secret”- In the app, go to Certificates & secrets.
- Click New client secret.
- Enter a Description, for example
Trustle. Select an expiry in Expires, for example 24 months. - Click Add.
- Copy the Value column, not the Secret ID.
Step 3: Grant permissions
Section titled “Step 3: Grant permissions”-
In the app, go to API permissions. Click Add a permission.
-
Select Microsoft Graph, then Application permissions. Do not select Delegated permissions.

-
Search for and select each permission:
Permission Required What Trustle does with it User.Read.AllYes Imports users and deleted users. Test Connection uses it. Group.Read.AllYes Imports groups. GroupMember.ReadWrite.AllYes Imports group members. Adds people to groups and removes them. Application.Read.AllYes Imports service principals and their app roles. AppRoleAssignment.ReadWrite.AllYes Imports app role assignments. Assigns and removes app roles. RoleManagement.ReadWrite.DirectoryYes Imports directory role members. Adds people to directory roles and removes them. AuditLog.Read.AllYes Imports directory audit logs. With Entra ID P1 or P2, also reads sign-in logs for last-used dates. The first sync reads the last 30 days. Directory.Read.AllOptional Imports the apps each user consented to. Without it, Trustle shows no consented apps. User.ReadWrite.AllOptional Deletes users. Without it, Trustle cannot delete a user. DelegatedPermissionGrant.ReadWrite.AllOptional Revokes an app that a user consented to. Without it, the revoke fails. Synchronization.ReadWrite.AllOptional Writes group member changes to Active Directory at once. See Active Directory groups. Without it, the change reaches Active Directory on the next Cloud Sync cycle. -
Click Grant admin consent for your organization. Click Yes.
-
Check that each permission shows Granted for your organization.

The app needs no Entra directory role, such as Directory Readers. The application permissions are enough.
Active Directory groups
Section titled “Active Directory groups”This section applies only if you use Microsoft Entra Cloud Sync to write groups back to Active Directory.
Trustle adds and removes members in Entra ID. Cloud Sync then writes the change to Active Directory on its next cycle, about every 20 minutes. With Synchronization.ReadWrite.All, Trustle asks Cloud Sync to write the change at once. Trustle also uses Application.Read.All to find the Cloud Sync job.
- The group must have its source of authority in the cloud. Trustle cannot change a group that Active Directory owns.
- The user must come from Active Directory.
- Cloud Sync skips a disabled user.
- Cloud Sync licensing applies. Microsoft Entra ID P1 covers the first two new Entra-to-Active Directory configurations in a tenant. Configurations 3 to 20 need Microsoft Entra ID Governance.
Step 4: Collect the values for Trustle
Section titled “Step 4: Collect the values for Trustle”| Trustle field | Where to find it in Entra ID | Example |
|---|---|---|
| Client ID | App Overview → Application (client) ID | abcdef12-3456-7890-abcd-ef1234567890 |
| Client Secret | The Value from Step 2 | abc8Q~… |
| Tenant ID | App Overview → Directory (tenant) ID | 12345678-1234-1234-1234-123456789012 |
Connect in Trustle
Section titled “Connect in Trustle”- In Trustle, go to Connections.
- Under Identity Providers, find Entra ID and click Connect.
- Enter a Connection Name, for example
Entra ID production. Description is optional. - Enter the values from Step 4. Leave Workspace ID (Optional) empty. Trustle does not use it.
- Select Use as Identity Provider if Entra ID is the source of your users. Trustle allows one identity provider at a time.
- Click Test Connection.
- After the test passes, click Save Connection.
Verify
Section titled “Verify”- On the Connections page, open the Entra ID connection.
- Wait for the first sync to finish.
- Check that the user count and the group count match Entra ID.
If something is missing, see Troubleshooting.
Security notes
Section titled “Security notes”Troubleshooting
Section titled “Troubleshooting”Test Connection fails
Section titled “Test Connection fails”- Tenant ID: use the Directory (tenant) ID of the tenant where you registered the app.
- Client ID: use the Application (client) ID, not the Object ID.
- Client Secret: paste the secret Value, not the Secret ID. Check that the secret has not expired.
- Admin consent:
User.Read.Allmust show Granted for your organization.
Test Connection passes, but the sync fails
Section titled “Test Connection passes, but the sync fails”A required permission from Step 3 is missing or has no admin consent. Test Connection checks only User.Read.All. Grant the missing permission and its admin consent. Then run the sync again.
Saving fails with “Organization already has an identity provider”
Section titled “Saving fails with “Organization already has an identity provider””Trustle allows one identity provider at a time. Clear Use as Identity Provider, or remove the other identity provider connection first.
Consented apps or last-used dates are missing
Section titled “Consented apps or last-used dates are missing”- Consented apps: grant
Directory.Read.All. - Last-used dates: grant
AuditLog.Read.All. Your tenant also needs Microsoft Entra ID P1 or P2.
Trustle shows the data after the next sync.
Trustle cannot delete a user
Section titled “Trustle cannot delete a user”Grant User.ReadWrite.All and its admin consent.
Trustle cannot revoke an app that a user consented to
Section titled “Trustle cannot revoke an app that a user consented to”Grant DelegatedPermissionGrant.ReadWrite.All and its admin consent.
A group change takes up to 20 minutes to reach Active Directory
Section titled “A group change takes up to 20 minutes to reach Active Directory”Grant Synchronization.ReadWrite.All and its admin consent. Without it, the change waits for the next Cloud Sync cycle. See Active Directory groups.
None of these fixes work
Section titled “None of these fixes work”Email support@trustle.com. Include the error message, the connection name, and the Directory (tenant) ID and the Application (client) ID. Never send a secret, key, or token.