Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-EntraBetaCustomSecurityAttributeDefinition
Create a new customSecurityAttributeDefinition object.
Syntax
Default (Default)
New-EntraBetaCustomSecurityAttributeDefinition
-IsSearchable <Boolean>
-IsCollection <Boolean>
-AttributeSet <String>
-Type <String>
-Name <String>
-Status <String>
-UsePreDefinedValuesOnly <Boolean>
[-Description <String>]
[<CommonParameters>]
Description
The New-EntraBetaCustomSecurityAttributeDefinition cmdlet creates a new customSecurityAttributeDefinition object. Specify IsSearchable, IsCollection, AttributeSet, Type, Name, Status and UsePreDefinedValuesOnly parameters for create a new custom security attribute definition.
You can define up to 500 active objects in a tenant.
The signed-in user must be assigned one of the following directory roles:
- Attribute Definition Administrator
Examples
Example 1: Add a custom security attribute
Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All'
$attributeSet = Get-EntraAttributeSet -Id 'ContosoSet'
$params = @{
Name = 'ProjectTest'
Description = 'Target completion'
Type = 'String'
Status = 'Available'
AttributeSet = $attributeSet.Id
IsCollection = $False
IsSearchable = $True
UsePreDefinedValuesOnly = $True
}
New-EntraBetaCustomSecurityAttributeDefinition @params
Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly
-- ------------ ----------- ------------ ------------ ---- ------ ---- -----------------------
Test_ProjectTest Test Target completion False True ProjectTest Available String False
This example demonstrates how to add a custom security attribute.
-Nameparameter specifies the name of the custom security attribute.-Descriptionparameter specifies the description of the custom security attribute.-Typeparameter specifies the data type for the custom security attribute values.-Statusparameter specifies the custom security attribute is active or deactivated.-AttributeSetparameter specifies the name of attribute set.-IsCollectionparameter specifies the allows multiple values can be assigned to the custom security attribute.-IsSearchableparameter specifies the custom security attribute values are indexed for searching on objects.-UsePreDefinedValuesOnlyparameter specifies the only predefined values can be assigned to the custom security attribute.
Parameters
-AttributeSet
Name of the attribute set. Case insensitive.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-IsCollection
Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true.
Parameter properties
| Type: | System.Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IsSearchable
Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later.
Parameter properties
| Type: | System.Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-Type
Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
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
None
Outputs
System.Object
Related Links
Feedback
Was this page helpful?
