Get-EntraAttributeSet

Gets a list of attribute sets.

Syntax

Get-EntraAttributeSet
 []
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.

Type:System.String
Aliases:Id
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