New-EntraAttributeSet

Adds a new attribute set.

Syntax

New-EntraAttributeSet
   [-AttributeSetId <String>]
   [-Description <String>]
   [-MaxAttributesPerSet <Int32>]
   [<CommonParameters>]

Description

Adds a new Microsoft Entra ID attribute set object.

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 Attribute Definition Administrator is the only privileged role supported for this operation.

Examples

Example 1: Add a single attribute set

Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
$params = @{
    AttributeSetId = 'NewCustomAttributeSet'
    Description = 'Attributes for engineering team'
    MaxAttributesPerSet = 10
}

New-EntraAttributeSet @params

Id      Description                     MaxAttributesPerSet
--      -----------                     -------------------
Testing Attributes for engineering team 10

This example demonstrates hoe to add a single attribute set.

  • -Id parameter specifies the name of the attribute set.
  • -Description parameter specifies the description for the attribute set.
  • -MaxAttributesPerSet parameter specifies the maximum number of custom security attributes.

Parameters

-AttributeSetId

Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required.

Type:System.String
Aliases:Id
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MaxAttributesPerSet

Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later.

Type:System.Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object