Edit

Share via


Set-EntraCustomSecurityAttributeDefinition

Update the properties of a customSecurityAttributeDefinition object.

Syntax

Default (Default)

Set-EntraCustomSecurityAttributeDefinition

    -Id <String>
    [-Description <String>]
    [-Status <String>]
    [-UsePreDefinedValuesOnly <Boolean>]
    [<CommonParameters>]

Description

Update the properties of a customSecurityAttributeDefinition object. Specify Id parameter to update a custom security attribute definition.

The signed-in user must be assigned one of the following directory roles:

  • Attribute Definition Administrator

Examples

Example 1: Update a custom security attribute

Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All'
$attributeDefinition = Get-EntraCustomSecurityAttributeDefinition | Where-Object { $_.Name -eq 'Engineering' }
Set-EntraCustomSecurityAttributeDefinition -Id $attributeDefinition.Id -Description 'Engineering Description' -Status 'Available' -UsePreDefinedValuesOnly $false

This example update a custom security attribute.

  • -Id parameter specifies the custom security attribute definition object ID.
  • -Description parameter specifies the description of the custom security attribute.
  • -Status parameter specifies the custom security attribute is active or deactivated.
  • -UsePreDefinedValuesOnly parameter specifies the only predefined values can be assigned to the custom security attribute.

Parameters

-Description

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

Parameter properties

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

Parameter sets

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

-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

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

-Status

Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later.

Parameter properties

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

Parameter sets

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

-UsePreDefinedValuesOnly

Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true.

Parameter properties

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

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