๐Ÿ›ก Customer onboarding

Connect Microsoft Entra ID
in minutes.

Identity Risk Assessments connects to your tenant with a read-only app registration. It never signs in as users and cannot change users, roles, or policies โ€” it only reads security signals to produce your risk score and recommendations.

โฑ ~15 min (portal) / ~2 min (CLI) ๐Ÿ‘ค Global Admin or Privileged Role Admin ๐Ÿ”’ Read-only

Option A โ€” Portal (point & click)

1
Register the app. Go to entra.microsoft.com โ†’ Applications โ†’ App registrations โ†’ New registration. Name it identityassess, supported account type: single tenant. Leave redirect URI blank. Register.
2
Add permissions. In the app โ†’ API permissions โ†’ Add permission โ†’ Microsoft Graph โ†’ Application permissions โ†’ add the 11 permissions in the table below โ†’ Add permissions.
3
Grant admin consent. Click Grant admin consent for [your organization] โ†’ Yes.
4
Create a secret. Certificates & secrets โ†’ New client secret (12 months recommended) โ†’ copy the Value immediately โ€” shown once.
5
Collect the IDs. Tenant ID (Entra Overview) and Application (client) ID (app Overview). Send the three values to the platform team over a secure channel.

Option B โ€” CLI automation (recommended)

Requires the Azure CLI.

# Log in (opens a browser)
az login

# Run the automated setup
.\scripts\setup-entra-app.ps1 -AppName "identityassess" -SecretYears 1

The script creates the app, adds all permissions, grants admin consent, creates the secret, and saves the three values to entra-credentials.txt (file locked to your user).

โš ๏ธ The consent step needs Global Administrator or Privileged Role Administrator. If your account lacks it, the script prints the exact command for an admin to run.

Manual CLI (reference)

GRAPH="00000003-0000-0000-c000-000000000000"   # Microsoft Graph resource id

APP_ID=$(az ad app create --display-name "identityassess" --sign-in-audience AzureADMyOrg --query appId -o tsv)

az ad app permission add --id "$APP_ID" --api "$GRAPH" --api-permissions \
  "User.Read.All=Role" "Reports.Read.All=Role" "AuditLog.Read.All=Role" \
  "IdentityRiskyUser.Read.All=Role" "IdentityRiskyServicePrincipal.Read.All=Role" \
  "Policy.Read.All=Role" "Policy.Read.PermissionGrant=Role" \
  "RoleManagement.Read.Directory=Role" "Application.Read.All=Role" \
  "Device.Read.All=Role" "Directory.Read.All=Role"

az ad app permission admin-consent --id "$APP_ID"

SECRET=$(az ad app credential reset --id "$APP_ID" --display-name "identityassess" --years 1 --query password -o tsv)

echo "ENTRA_TENANT_ID=$(az account show --query tenantId -o tsv)"
echo "ENTRA_CLIENT_ID=$APP_ID"
echo "ENTRA_CLIENT_SECRET=$SECRET"

Permissions (all read-only)

PermissionWhat it enables
User.Read.AllUser inventory, dormant-account detection
Reports.Read.AllMFA / authentication-method coverage
AuditLog.Read.AllSign-in logs, admin activity, MFA registration
IdentityRiskyUser.Read.AllRisky users (P2/E5)
IdentityRiskyServicePrincipal.Read.AllRisky sign-ins / service principals (P2/E5)
Policy.Read.AllConditional Access, security defaults
Policy.Read.PermissionGrantUser-consent policies
RoleManagement.Read.DirectoryPrivileged roles, PIM
Application.Read.AllService principals, app owners, grants
Device.Read.AllDevice compliance
Directory.Read.AllTenant & directory data
Licenses: risk signals (risky users/sign-ins/service principals) and PIM require Entra ID P2 / E5; dormant-account detection requires P1 or P2. The connector degrades gracefully on free/cloud-only tenants.

Send these back to the platform team

ENTRA_TENANT_ID=<tenant-id>
ENTRA_CLIENT_ID=<client-id>
ENTRA_CLIENT_SECRET=<secret-value>

Security notes

  • Least privilege: permissions are read-only. Policy.Read.PermissionGrant and IdentityRiskyServicePrincipal.Read.All can be omitted to minimize further (fewer signals).
  • Rotate secrets at least annually; update the value in the console โ€” no re-registration needed.
  • Monitor: see connector activity in Entra โ†’ Monitoring โ†’ Sign-in logs (service principal sign-ins).
  • Revoke: delete the app registration (or its secret) in Entra to disconnect immediately.