Edit

Share via


Get-EntraAttributeSet

Gets a list of attribute sets.

Syntax

GetQuery (Default)

Get-EntraAttributeSet

    [<CommonParameters>]

GetById

Get-EntraAttributeSet

    -AttributeSetId <String>
    [<CommonParameters>]

Description

The Get-EntraAttributeSet cmdlet gets a list of Microsoft Entra ID attribute sets.

In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are:

  • Attribute Assignment Reader
  • Attribute Definition Reader
  • Attribute Assignment Administrator
  • Attribute Definition Administrator

By default, other administrator roles cannot read, define, or assign custom security attributes.

Examples

Example 1: Get an all attribute sets

Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
Get-EntraAttributeSet
Id                    Description                           MaxAttributesPerSet
--                    -----------                           -------------------
Engineering           Attributes for cloud engineering team 25
Contoso                 Attributes for Contoso            25

This example returns all attribute sets.

Example 2: Get an attribute sets

Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
Get-EntraAttributeSet -AttributeSetId 'Testing'
Id      Description                     MaxAttributesPerSet
--      -----------                     -------------------
Testing Attributes for engineering team 10

This example demonstrates how to retrieve an attribute set by Id.

  • AttributeSetId parameter specifies the unique identifier for the attribute set within a tenant.

Parameters

-AttributeSetId

Unique identifier for the attribute set within a tenant.

This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive.

Parameter properties

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

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