Resolve a mystery GUID to a user, group, app, service principal, role, license, or other directory object, then count assignments.
Complexity: Intermediate. Impact: troubleshooting + audit + identity + access-review.
Why use this workflow
Administrators regularly encounter bare GUIDs in audit logs, sign-in logs, Conditional Access reports, Intune exports, PowerShell output, and support tickets, with no indication of what type of object they refer to. A GUID such as 7a896ff9-8734-4cc8-b7d0-cb2c312c96b1 could be any of the following:
- A user object ID
- A group object ID
- An application (app registration) object ID or app ID
- A service principal object ID or app ID
- A directory role definition or template ID
- A license SKU ID
- An administrative unit ID
- A Conditional Access policy ID
- A managed device (Intune) ID
- A tenant ID
This workflow provides a probe sequence that tests the GUID against each object type in Microsoft Graph until one responds with a match. If the match is an application or group, it then counts the users effectively assigned.
Expected outcomes
- The object type associated with the unknown GUID is identified
- The display name and description of the object
- (If applicable) A deduplicated count of users assigned to the object, including users inherited through nested group membership
- A repeatable approach you can run whenever an unknown GUID appears
Risks and considerations
- App ID and object ID collision. An application has two GUIDs: its object ID (
id) and its app ID (appId). The same app's service principal has its own object ID but shares the app ID. Probe both. - SKU filter limitation.
subscribedSkusdoes not support$filter. List all SKUs and match client-side. - 403 versus 404. A 403 means that the token is missing the scope for that resource type (for example,
Policy.Read.Allfor Conditional Access), not that the object does not exist. Treat 403 as inconclusive and continue probing. - Group assignments inflate user counts. When you count users assigned to an enterprise app, expand each assigned group to its members and deduplicate. Users often appear in several assigned groups.
- Nested groups.
/membersreturns direct members only. Use/transitiveMembersif nested group membership is in use. - Do not log the GUID externally until you know what it is. It may reference a privileged role or a sensitive service principal.
Required permissions
| Permission | Why it's needed |
|---|---|
| Directory.Read.All | Read users, groups, applications, service principals, administrative units, and directory roles |
| Application.Read.All | Read applications and service principals and their app role assignments |
| Organization.Read.All | Read subscribedSkus to identify license SKU IDs |
| DeviceManagementManagedDevices.Read.All | Read Intune managed devices if the GUID may refer to a device |
| Policy.Read.All | Read Conditional Access policies if the GUID may refer to a Conditional Access policy |
| RoleManagement.Read.Directory | Read directory role definitions and assignments |
Ask Dex
Paste the prompt into a Dex conversation.
Prompt for IT admins
Identify what the Entra ID GUID {guid} refers to (user, group, app, service principal, role, SKU, AU, CA policy, or device). Once identified, if it is an application or group, count the total unique users effectively assigned - expanding any assigned groups transitively and deduplicating. Return the object type, display name, and user count.
Manual steps (admin center)
The Entra admin center does not have a single search box that accepts a bare object ID across every object type, so you probe each area. Work through the list in order. Most unknown GUIDs resolve in the first three checks.
1. Try the global search
- Sign in to the Microsoft Entra admin center as a Global Reader or higher.
- Paste the GUID into the top search bar. Entra matches user, group, application, and service principal object IDs here. If a result appears, select it.
2. Check Users
Entra admin center > Identity > Users > All users
Paste the GUID into the search field. If it resolves, the GUID is a user object ID.
3. Check Groups
Entra admin center > Identity > Groups > All groups
Search by object ID. If it resolves, note the group's assigned apps, roles, and member count on its Overview page.
4. Check Enterprise applications and App registrations
Entra admin center > Identity > Applications > Enterprise applications > All applications
Change the filter to Application ID starts with and paste the GUID. If nothing matches, switch to Object ID starts with.
Entra admin center > Identity > Applications > App registrations > All applications
Repeat the app ID and object ID probe.
5. Check Roles, Administrative units, and Licenses
- Identity > Roles & admins > Roles: role template IDs are well-known constants. Compare against the published list.
- Identity > Administrative units: paste the GUID into the search.
- Billing > Licenses > All products: inspect the skuId column (hidden by default, enable it with Columns).
6. Count users assigned (if the GUID is an app or group)
- Open the Enterprise application > Users and groups page.
- Record each assigned principal. Groups need to be expanded to member users.
- For each assigned group, go to Groups > the group > Members and copy the member list.
- Combine all member lists into a spreadsheet and deduplicate by UPN.
The portal workflow is reliable but tedious. For anything beyond a quick spot-check, use the API or PowerShell approach.
Microsoft Graph API
Issue the following requests in order. The first one that returns HTTP 200 with a populated body tells you the object type. A 404 is a clean negative. A 403 means insufficient scope, not a negative, so continue probing.
1. Is it a group?
GET https://graph.microsoft.com/v1.0/groups/{guid}?$select=id,displayName,description,groupTypes2. Is it a user?
GET https://graph.microsoft.com/v1.0/users/{guid}?$select=id,displayName,userPrincipalName,accountEnabled3. Is it an application object ID?
GET https://graph.microsoft.com/v1.0/applications/{guid}?$select=id,appId,displayName4. Is it an app ID (applications)?
GET https://graph.microsoft.com/v1.0/applications?$filter=appId eq '{guid}'&$select=id,appId,displayName5. Is it a service principal object ID?
GET https://graph.microsoft.com/v1.0/servicePrincipals/{guid}?$select=id,appId,displayName,servicePrincipalType6. Is it an app ID (service principals)?
GET https://graph.microsoft.com/v1.0/servicePrincipals?$filter=appId eq '{guid}'&$select=id,appId,displayName7. Is it an administrative unit?
GET https://graph.microsoft.com/v1.0/directory/administrativeUnits/{guid}8. Is it a directory role definition?
GET https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions/{guid}9. Is it a license SKU?
subscribedSkus does not support $filter. List all SKUs and match client-side:
GET https://graph.microsoft.com/v1.0/subscribedSkus?$select=skuId,skuPartNumber,consumedUnits,prepaidUnits10. Is it a Conditional Access policy?
GET https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies/{guid}11. Is it a managed device?
GET https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{guid}Once identified: count users assigned
For an enterprise application (service principal)
GET https://graph.microsoft.com/v1.0/servicePrincipals/{spObjectId}/appRoleAssignedTo?$select=principalId,principalDisplayName,principalType&$top=999Each assignment's principalType is either User or Group. For groups, resolve the members:
GET https://graph.microsoft.com/v1.0/groups/{groupId}/transitiveMembers/microsoft.graph.user?$select=id,userPrincipalName&$count=true
ConsistencyLevel: eventualDeduplicate the union of all user principals across direct and group-inherited assignments to get the true user count.
For a group
GET https://graph.microsoft.com/v1.0/groups/{groupId}/transitiveMembers/$count
ConsistencyLevel: eventual
PowerShell
Prerequisites
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Directory.Read.All","Application.Read.All","Organization.Read.All"Approach
- Issue
Get-Mg*calls against each candidate object type, and suppress the expected 404 errors. - Print the object type, display name, and object ID of the first match.
- If the match is an application or service principal, enumerate
appRoleAssignedTo, expand every assigned group throughtransitiveMembers, and print the deduplicated user count and the assignment breakdown. - If the match is a group, print the transitive user member count.
Interpretation hints
- Log a 403 as inconclusive, and re-run with the additional scope named in the error.
- If two matches occur (for example, an app and its service principal both match an app ID probe), report both. The service principal is the one with assignments.