Get-MgExtensionAttributeInfo
SYNOPSIS
Inventories the custom attributes usable in Entra ID dynamic group rules: the 15 built-in extension attributes and the directory extensions.SYNTAX
__AllParameterSets
DESCRIPTION
Returns one row per custom attribute available in the tenant, whether it carries a value or not, so the inventory is exhaustive. Two mechanisms are covered:- the 15 built-in extension attributes exposed through onPremisesExtensionAttributes (extensionAttribute1..15);
- the directory extensions declared by an application, named extension_<AppId without dashes>_<Name>.
- Orphaned: the application that declared the directory extension no longer exists. The values remain in the directory and keep driving dynamic group membership, but the attribute can no longer be listed or corrected, and recreating the application does not help since the new AppId differs.
- Referenced but empty: a dynamic group rule points at an attribute no object carries, so the group stays empty.
EXAMPLES
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
PARAMETERS
-ExcludeBuiltIn
Leaves the 15 built-in extension attributes out of the inventory and reports directory extensions only.-ExportPath
Optional output directory for the Excel export. Defaults to the user profile.-ExportToExcel
Exports the result to an Excel file in the user’s profile directory instead of returning it.-ForceNewToken
Forces a new token to be requested from Microsoft Graph.-SkipDynamicGroups
Skips reading the dynamic group membership rules, so the DynamicGroups columns are left empty.-SkipUsageCount
Skips counting the objects carrying a value. The count is one Graph query per attribute and per object type, which is the slow part of the scan on a large tenant.-TargetObject
Object types to count values on. Valid values: User, Group, Device. Default is User only. Adding Device also counts the built-in extension attributes on devices, which carry them under a different property name and can be addressed by a device membership rule.CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.INPUTS
OUTPUTS
NOTES
Required Microsoft Graph permissions:- Application.Read.All
- Directory.Read.All
- Group.Read.All
- User.Read.All