BeginnerIdentity Provider10 min read

Connect Azure Entra ID to Gateco

Connect Azure Entra ID (Azure AD) to Gateco via Microsoft Graph API. Covers app registration, API permissions, and automated user/group sync.

Last updated: May 21, 2026

Prerequisites

  • An Azure account with the Application Administrator or Global Administrator role
  • Admin consent rights to grant tenant-wide application permissions

Overview — 5 steps

  1. 1Register an application in Entra ID
  2. 2Grant Microsoft Graph API permissions
  3. 3Create a client secret
  4. 4Add credentials to Gateco
  5. 5Trigger initial sync

Gateco connects to Azure Entra ID via a registered application (service principal) that reads users and groups from the Microsoft Graph Groups API. This guide takes you from a blank Entra ID tenant to a working Azure AD group sync in about 10 minutes — enabling identity-aware retrieval and RAG access control based on your Azure directory.

Azure Entra ID integration requires the Growth plan or above. No Azure premium license is required — read-only service-principal access to users and groups is available on all Entra ID tiers.

Step 1 — Register an application

  1. Go to Azure Portal → Microsoft Entra ID → App registrations → New registration.
  2. Name: gateco (or any name meaningful to your org).
  3. Supported account types: "Accounts in this organizational directory only (Single tenant)".
  4. Redirect URI: leave blank.
  5. Click Register.
  6. On the app overview page, note the Directory (tenant) ID and Application (client) ID. You will need both.

Step 2 — Grant API permissions

Gateco uses application permissions, not delegated permissions. Application permissions allow the service to read your directory without a signed-in user — required for automated background sync.

  1. In the app registration, go to API permissions → Add a permission.
  2. Choose Microsoft Graph → Application permissions.
  3. Search for and add: User.Read.All, Group.Read.All, GroupMember.Read.All.
  4. Click Add permissions.
  5. Click "Grant admin consent for <your tenant>" and confirm.
  6. All three permissions should show a green checkmark and status "Granted for <tenant>".

Admin consent is required. The "Grant admin consent" button is only visible to Global Administrators and Application Administrators. If you do not see it, ask your Azure admin to grant consent for you.

Step 3 — Create a client secret

  1. In the app registration, go to Certificates & secrets → Client secrets → New client secret.
  2. Description: gateco-sync (or any label).
  3. Expiry: 24 months (recommended). Set a calendar reminder to rotate before expiry.
  4. Click Add.
  5. Copy the Value immediately — it is shown only once. If you navigate away, you must create a new secret.

Step 4 — Add credentials to Gateco

In the Gateco dashboard:

  1. Navigate to Identity Providers → Add provider → Azure Entra ID.
  2. Enter the three values from the table below.
  3. Click Test connection. Gateco will display the number of users and groups it can read.
  4. Click Save.
FieldValue
Tenant IDDirectory (tenant) ID from Step 1
Client IDApplication (client) ID from Step 1
Client SecretSecret value from Step 3 (not the Secret ID)

Step 5 — Trigger initial sync

After saving the provider, click Sync now. Gateco will:

  1. Fetch all users from GET /v1.0/users (paginated).
  2. Fetch all groups from GET /v1.0/groups.
  3. Fetch group memberships for each group.
  4. Create or update Principal records.

Sync typically completes in under 30 seconds for tenants up to 10,000 users.

How Gateco uses your Entra ID data

Entra ID fieldGateco principal fieldUse in policy conditions
mail (or userPrincipalName if mail is null)emailprincipal.email
displayNamedisplay_nameDisplay only
departmentattributes.departmentprincipal.attributes.department
jobTitleattributes.titleprincipal.attributes.title
Group membershipgroups arrayprincipal.groups

Users without Microsoft 365 licenses often have mail = null in the Graph API. Gateco automatically falls back to userPrincipalName in that case. Guest accounts with #EXT# in their UPN are synced as-is.

Troubleshooting

ErrorCauseFix
Connection test fails with 403 ForbiddenAdmin consent not grantedGo to API permissions and click "Grant admin consent". Only Global Admins and App Admins can do this.
Zero users synced after successful connectionDelegated User.Read.All instead of application typeDelete the delegated permission and add the application version. Check the Type column shows "Application".
Groups sync but members not populatingGroupMember.Read.All missing or not consentedAdd GroupMember.Read.All (application type) and grant admin consent.
Sync stops working after monthsClient secret expiredCreate new secret in Entra ID, update it in Gateco Identity Providers → edit → save.

Frequently asked questions

What Microsoft Graph permissions does Gateco need?

Gateco needs three application permissions (not delegated): User.Read.All to read all users, Group.Read.All to read all groups, and GroupMember.Read.All to read group memberships. All three must be granted admin consent. Delegated permissions will not work because Gateco runs as a background service without a signed-in user.

How do I rotate the client secret before it expires?

In Azure Portal, go to App registrations → your Gateco app → Certificates & secrets → New client secret. Copy the new value, then update the Client Secret field in Gateco under Identity Providers → edit your Azure provider → Save. The old secret can then be deleted. Set a calendar reminder 30 days before the expiry date you chose.

Can I use SCIM provisioning and the polling sync at the same time?

Yes. SCIM provisioning (available on Growth plan and above) pushes changes from Entra ID to Gateco in real time, keeping identity-aware retrieval policies current as your Azure AD groups change. The polling sync still runs on its schedule and acts as a fallback. Running both ensures you catch any missed SCIM events. If you use SCIM, you can reduce the polling sync interval to hourly or longer.

Ready to add policy-aware retrieval?

Connect your Azure setup to Gateco in under 5 minutes.