Get-EntraCustomSecurityAttributeDefinition
Gets a list of custom security attribute definitions.
Syntax
Get-EntraCustomSecurityAttributeDefinition
[-Property <String[]>]
[<CommonParameters>]
Get-EntraCustomSecurityAttributeDefinition
-Id <String>
[-Property <String[]>]
[<CommonParameters>]
Description
Gets a list of Microsoft Entra ID custom security attribute definitions. Specify Id
parameter to get a list of custom security attribute definitions.
In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation:
- Attribute Assignment Reader
- Attribute Definition Reader
- Attribute Assignment Administrator
- Attribute Definition Administrator
Examples
Example 1: Get a list of all custom security attribute definitions
Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All'
Get-EntraCustomSecurityAttributeDefinition
Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly
-- ------------ ----------- ------------ ------------ ---- ------ ---- -----------------------
Engineering_newvalue Engineering New Eng Value True True NewValue Available String False
Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False
This example returns all custom security attribute definitions.
Example 2: Get a specific custom security attribute definition
Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All'
Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate'
Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly
-- ------------ ----------- ------------ ------------ ---- ------ ---- -----------------------
Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False
This example returns a specific custom security attribute definition.
Id
parameter specifies the custom security attribute definition object ID.
Parameters
-Id
The unique identifier of a Microsoft Entra ID custom security attribute definition object.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Property
Specifies properties to be returned
Type: | System.String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
Outputs
System.Object