Edit

Share via


Get-EntraCustomSecurityAttributeDefinition

Gets a list of custom security attribute definitions.

Syntax

GetQuery (Default)

Get-EntraCustomSecurityAttributeDefinition

    [-Property <String[]>]
    [<CommonParameters>]

GetById

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'
$attributeDefinition = Get-EntraCustomSecurityAttributeDefinition | Where-Object { $_.Name -eq 'Engineering' }
Get-EntraCustomSecurityAttributeDefinition -Id $attributeDefinition.Id
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.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetById
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Property

Specifies properties to be returned

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Select

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

System.String

Outputs

System.Object