Skip to the documentation
All documentation pages ↓

Identity sources

Connect Microsoft Entra ID or Google Workspace without code: setup steps, permissions, licences and what is read.

How it works

An identity source lets NexGuard read the sign-in record your own directory already keeps, so you get detection without writing an integration. Connect it in the console under Integrations → Identity sources; it needs the identity_sources:manage permission, which organisation owners and administrators hold.

  • The directory is read every 5 minutes by default (5 to 1440). The first read goes back 24 hours by default (0 to 48: NexGuard does not accept events older than 48 hours).
  • Each sign-in becomes the same event an API integration would send, and goes through the same minimisation and detection. The account, email and device id are stored only as tenant-salted hashes after normalisation. Display names, directory object ids, cities and coordinates are never read into NexGuard.
  • Imported sign-ins count towards your monthly event allowance, exactly like API events. A sign-in read twice is stored and counted once.
  • Credentials are stored encrypted and are never shown again after you save them. NexGuard only calls login.microsoftonline.com, graph.microsoft.com, oauth2.googleapis.com and admin.googleapis.com.
  • If the credential is refused three times in a row, NexGuard switches the source off and tells your notification channels. Saving a new credential switches it back on.

Microsoft Entra ID

  1. Sign in to the Microsoft Entra admin center (entra.microsoft.com) as at least a Cloud Application Administrator. Go to Entra ID → App registrations → New registration.
  2. Name it NexGuard, choose Accounts in this organizational directory only, leave the redirect URI empty and select Register.
  3. From the app's Overview, copy the Application (client) ID and the Directory (tenant) ID.
  4. API permissions → Add a permission → Microsoft Graph → Application permissions: tick AuditLog.Read.All and add it. No other permission is needed.
  5. Select Grant admin consent (Privileged Role Administrator or Global Administrator).
  6. Certificates & secrets: create a client secret and copy its Value, or upload a certificate and give NexGuard the certificate and its unencrypted private key (PEM). NexGuard signs a PS256 client assertion with it.

The connection test checks, in order: the credential, that the token carries AuditLog.Read.All, the licence, and that one sign-in can be read. It stops at the first problem and names it.

status.errorCodeNexGuard event type
0LOGIN_SUCCESS
50074, 50076, 50079 — strong authentication requiredMFA_CHALLENGE
500121 — strong authentication failedMFA_FAILED
50072, 50097, 50125, 50140, 50199 — interrupts (stay signed in, register MFA…)LOGIN_ATTEMPT
any other codeLOGIN_FAILED

Legacy clients (IMAP, POP, SMTP, MAPI, Exchange ActiveSync, other clients) are flagged as legacy_authentication, and Microsoft's own riskLevelDuringSignIn and riskState are kept beside the event (P2 directories).

Google Workspace

  1. In the Google Cloud console, choose or create a project and enable the Admin SDK API.
  2. Create a service account (no project roles needed) and a JSON key for it.
  3. In the Google Admin console: Security → Access and data control → API controls → Manage Domain Wide Delegation → Add new. Give the service account's client ID and exactly this one scope:
    https://www.googleapis.com/auth/admin.reports.audit.readonly
  4. In NexGuard, paste the whole JSON key and the email of an administrator who may view reports. NexGuard reads the login activity report on that person's behalf; the scope gives no access to mail, files or the user directory.
login eventNexGuard event type
login_successLOGIN_SUCCESS
login_failureLOGIN_FAILED
logoutLOGOUT
login_challenge, login_verificationMFA_SUCCESS (Challenge Passed.), MFA_FAILED (Challenge Failed.), otherwise MFA_CHALLENGE
suspicious_login*, account_disabled_*, gov_attack_warningACCOUNT_FLAGGED
password_editPASSWORD_CHANGED
2sv_enroll, 2sv_disable, recovery_*_editACCOUNT_UPDATED
passkey_enrolledDEVICE_ADDED

Other Google event names are ignored.

Keycloak and other OIDC providers

These keep no sign-in log NexGuard can read from outside. Send their events with the SDK or the events API from the provider's event listener.

We use only the cookies needed to sign you in securely and to remember your language and display choices. No analytics, advertising or third-party cookies.

Cookie policy