This integration connects ZombieLicenseHunter to Microsoft Entra ID (formerly Azure Active Directory) and Microsoft 365. It syncs user accounts, license assignments, and sign-in activity so you can identify inactive users and reclaim unused licenses.
Prerequisites
- An active Microsoft 365 / Azure subscription
- Access to the Azure Portal with permission to create App Registrations
- A Global Administrator or Privileged Role Administrator to grant admin consent for API permissions
Setup Instructions
Step 1: Create an Azure App Registration
- Sign in to the Azure Portal.
- Navigate to Microsoft Entra ID > App registrations > New registration.
- Give the application a name (e.g.,
ZombieLicenseHunter). - Under Supported account types, select Accounts in this organizational directory only.
- Leave the Redirect URI blank — this integration uses server-to-server auth with no user redirect.
- Click Register.
- On the Overview page, copy and save:
- Application (client) ID
- Directory (tenant) ID
Step 2: Configure API Permissions
-
In your App Registration, go to API permissions > Add a permission.
-
Select Microsoft Graph > Application permissions.
-
Add the following three permissions:
Permission Purpose User.Read.AllRead user accounts, status, and license assignments Directory.Read.AllRead group memberships and org structure AuditLog.Read.AllRead sign-in activity for zombie detection -
Click Grant admin consent for [your organization] and confirm. This step requires a Global Admin or Privileged Role Admin.
All three permissions are Application type (not Delegated). If you do not see the "Grant admin consent" button, contact your Azure administrator.
Step 3: Create a Client Secret
- In your App Registration, go to Certificates & secrets > New client secret.
- Add a description (e.g.,
ZombieLicenseHunter) and choose an expiration period. - Click Add, then immediately copy the Value — it will not be shown again.
Important: Client secrets expire. Note the expiration date and plan to rotate the secret before it expires; once it has expired, every sync fails with an authentication error until you enter a new secret on the integration's edit page.
Step 4: Connect in ZombieLicenseHunter
- In ZombieLicenseHunter, go to Integrations → Add Integration and select Microsoft Entra ID. Set Category to Directory.
- The Authentication Method shows Service Principal; it is the only method offered.
- Enter the three values collected above:
- Azure Tenant ID — the Directory (tenant) ID from the App Registration Overview
- Client ID — the Application (client) ID from the App Registration Overview
- Client Secret — the value copied in Step 3
- Click Save Integration. ZombieLicenseHunter requests a token from Microsoft with these values to validate them, then encrypts and stores them.
- A background job verifies connectivity by calling the Microsoft Graph API, then begins syncing users and license data.
What Gets Synced
| Data | Details |
|---|---|
| User identity | User ID, UPN (login), primary email, email aliases |
| Account status | Enabled / disabled state, account creation date |
| License assignments | Assigned SKUs resolved to human-readable product names |
| Sign-in activity | Last interactive sign-in timestamp (used for zombie detection) |
Troubleshooting
"Insufficient privileges" or 403 error on first sync Admin consent was not granted, or was granted before all three permissions were added. Re-add any missing permissions and click Grant admin consent again.
"Invalid client secret" error The client secret may have expired or been copied incorrectly. Generate a new secret in Azure Portal (Certificates & secrets) and update the credentials in ZombieLicenseHunter.
No sign-in data appearing
AuditLog.Read.All is required for sign-in timestamps. Confirm it is listed under API permissions with a green admin-consent checkmark.
Users appear but licenses are missing
Verify User.Read.All has admin consent. Also confirm the users have licenses assigned in the Microsoft 365 Admin Center — unassigned users will show no license data.
Tenant ID not recognized
Ensure you are using the Directory (tenant) ID (a UUID), not your .onmicrosoft.com domain name.