Edit

Share via


Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue

Gets the predefined value for a custom security attribute definition.

Syntax

GetQuery (Default)

Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue

    -CustomSecurityAttributeDefinitionId <String>
    [-Filter <String>]
    [-Property <String[]>]
    [<CommonParameters>]

GetById

Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue

    -CustomSecurityAttributeDefinitionId <String>
    -Id <String>
    [-Property <String[]>]
    [<CommonParameters>]

Description

Gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify CustomSecurityAttributeDefinitionId parameter to retrieve the predefined value custom security attribute definition.

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

  • Attribute Definition Reader
  • Attribute Definition Administrator

Examples

Example 1: Get all predefined values

Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
$attributeDefinition = Get-EntraBetaCustomSecurityAttributeDefinition | Where-Object {$_.Name -eq 'Engineering'}
Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $attributeDefinition.Id
Id        IsActive
--        --------
Apline    True

This example retrieves an all predefined values.

  • -CustomSecurityAttributeDefinitionId parameter specifies the custom security attribute definition ID. You can use Get-EntraBetaCustomSecurityAttributeDefinition to get this value.

Example 2: Get predefined value with ID parameter

Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
$attributeDefinition = Get-EntraBetaCustomSecurityAttributeDefinition | Where-Object {$_.Name -eq 'Engineering'}
Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $attributeDefinition.Id -Id 'Alpine'
Id        IsActive
--        --------
Apline    True

This example retrieves a specific predefined value.

  • -CustomSecurityAttributeDefinitionId parameter specifies the custom security attribute definition ID. You can use Get-EntraBetaCustomSecurityAttributeDefinition to get this value.
  • -Id parameter specifies the ID of Microsoft Entra ID Object.

Example 3: Get predefined value with Filter parameter

Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All'
$attributeDefinition = Get-EntraBetaCustomSecurityAttributeDefinition | Where-Object {$_.Name -eq 'Engineering'}
Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $attributeDefinition.Id -Filter "Id eq 'Alpine'"
Id        IsActive
--        --------
Apline    True

This example retrieves a predefined value containing Id with the specified value.

  • -CustomSecurityAttributeDefinitionId parameter specifies the custom security attribute definition ID. You can use Get-EntraBetaCustomSecurityAttributeDefinition to get this value.

Parameters

-CustomSecurityAttributeDefinitionId

The unique identifier of customSecurityAttributeDefinition.

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

-Filter

Filter items by property values.

Parameter properties

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

Parameter sets

GetQuery
Position:Named
Mandatory:False
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 are not. This identifier is case sensitive, cannot be changed later, and is required.

Parameter properties

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

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