SYNOPSIS
Reports custom security attributes assigned to users, devices, and service principals (enterprise apps) in Microsoft Entra ID.SYNTAX
DESCRIPTION
Queries Microsoft Graph to enumerate custom security attribute assignments across users, devices, and service principals. Auto-discovers all attribute sets in the tenant, or restricts the scope to a single set when -AttributeSet is provided. The output is one row per (entity, attribute set, attribute name, value) so it can be filtered/pivoted easily.EXAMPLES
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
PARAMETERS
-AttributeSet
Restricts the report to a single attribute set name. If omitted, all attribute sets discovered in the tenant are reported.-EntityType
Limits the entity types scanned. Valid values: User, Device, ServicePrincipal. Default is all three.-OnlyAssigned
If specified, only entities that actually have at least one custom security attribute assignment are returned. This is the default behavior; the switch is kept for explicit/discoverable usage.-ForceNewToken
Switch parameter to force getting a new token from Microsoft Graph.-ExportToExcel
(Optional) If specified, exports the results to an Excel file in the user’s profile directory.-ExportPath
Optional output directory for the Excel export (defaults to the user profile).CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.INPUTS
OUTPUTS
NOTES
Required Microsoft Graph permissions:- CustomSecAttributeDefinition.Read.All
- CustomSecAttributeAssignment.Read.All
- User.Read.All
- Device.Read.All
- Application.Read.All