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.comandadmin.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
- 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. - Name it NexGuard, choose Accounts in this organizational directory only, leave the redirect URI empty and select Register.
- From the app's Overview, copy the Application (client) ID and the Directory (tenant) ID.
- API permissions → Add a permission → Microsoft Graph → Application permissions: tick
AuditLog.Read.Alland add it. No other permission is needed. - Select Grant admin consent (Privileged Role Administrator or Global Administrator).
- 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.errorCode | NexGuard event type |
|---|---|
0 | LOGIN_SUCCESS |
50074, 50076, 50079 — strong authentication required | MFA_CHALLENGE |
500121 — strong authentication failed | MFA_FAILED |
50072, 50097, 50125, 50140, 50199 — interrupts (stay signed in, register MFA…) | LOGIN_ATTEMPT |
any other code | LOGIN_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
- In the Google Cloud console, choose or create a project and enable the Admin SDK API.
- Create a service account (no project roles needed) and a JSON key for it.
- 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 - In NexGuard, paste the whole JSON key and the email of an administrator who may view reports. NexGuard reads the
loginactivity report on that person's behalf; the scope gives no access to mail, files or the user directory.
| login event | NexGuard event type |
|---|---|
login_success | LOGIN_SUCCESS |
login_failure | LOGIN_FAILED |
logout | LOGOUT |
login_challenge, login_verification | MFA_SUCCESS (Challenge Passed.), MFA_FAILED (Challenge Failed.), otherwise MFA_CHALLENGE |
suspicious_login*, account_disabled_*, gov_attack_warning | ACCOUNT_FLAGGED |
password_edit | PASSWORD_CHANGED |
2sv_enroll, 2sv_disable, recovery_*_edit | ACCOUNT_UPDATED |
passkey_enrolled | DEVICE_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.