Add-EntraCustomSecurityAttributeDefinitionAllowedValue
Adds a predefined value for a custom security attribute definition.
Syntax
Default (Default)
Add-EntraCustomSecurityAttributeDefinitionAllowedValue
-CustomSecurityAttributeDefinitionId <String>
-Id <String>
-IsActive <Boolean>
[<CommonParameters>]
Description
The Add-EntraCustomSecurityAttributeDefinitionAllowedValue
adds a predefined value for a Microsoft Entra ID custom security attribute definition.
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 following least privileged roles can be used:
- Attribute Definition Administrator
Examples
Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition
Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
$attributeDefinition = Get-EntraCustomSecurityAttributeDefinition | Where-Object {$_.Name -eq 'Engineering'}
Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $attributeDefinition.Id -Id 'Alpine' -IsActive $true
Id IsActive
-- --------
Alpine True
This example adds a predefined value to a custom security attribute definition.
-CustomSecurityAttributeDefinitionId
parameter specifies the custom security attribute definition ID. You can use the commandGet-EntraCustomSecurityAttributeDefinition
to get the ID.-Id
parameter specifies the identifier for the predefined value.-IsActive
parameter specifies the predefined value is active or deactivated.
Parameters
-CustomSecurityAttributeDefinitionId
The unique identifier for a custom security attribute definition in Microsoft Entra ID.
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 |
-Id
The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-IsActive
Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects.
Parameter properties
Type: | System.Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
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
Notes
Add-EntraCustomSecurityAttributeDefinitionAllowedValues
is an alias for Add-EntraCustomSecurityAttributeDefinitionAllowedValue
.