Edit

Share via


New-EntraApplicationExtensionProperty

Creates an application extension property.

Syntax

Default (Default)

New-EntraApplicationExtensionProperty

    -ApplicationId <String>
    [-Name <String>]
    [-DataType <String>]
    [-TargetObjects <System.Collections.Generic.List`1[System.String]>]
    [-IsMultiValued <Boolean>]
    [<CommonParameters>]

Description

The New-EntraApplicationExtensionProperty cmdlet creates an application extension property for an object in Microsoft Entra ID.

Examples

Example 1: Create an extension property

Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'"
New-EntraApplicationExtensionProperty -ApplicationId $application.Id -Name 'NewAttribute'
DeletedDateTime Id                                   AppDisplayName  DataType IsSyncedFromOnPremises Name                                                    TargetObjects
--------------- --                                   --------------  -------- ---------------------- ----                                                    -------------
                11112222-bbbb-3333-cccc-4444dddd5555 My new test app String   False                  extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {}

This command creates an application extension property of the string type for the specified object.

  • -ApplicationId parameter specifies the unique identifier of an application.
  • -Name parameter specifies the name of the extension property.

Example 2: Create an extension property with data type parameter

Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'"
New-EntraApplicationExtensionProperty -ApplicationId $application.Id -Name 'NewAttribute1' -DataType 'Boolean'
DeletedDateTime Id                                   AppDisplayName  DataType IsSyncedFromOnPremises Name                                                    TargetObjects
--------------- --                                   --------------  -------- ---------------------- ----                                                    -------------
                11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean  False                  extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {}

This command creates an application extension property of the specified data type for the specified object.

  • -ApplicationId parameter specifies the unique identifier of an application.
  • -Name parameter specifies the name of the extension property.
  • -DataType parameter specifies the data type of the value the extension property can hold.

Example 3: Create an extension property with targets parameter

Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'"
$targets = New-Object System.Collections.Generic.List[System.String]
$targets.Add('User')
New-EntraApplicationExtensionProperty -ApplicationId $application.Id -Name 'NewAttribute2' -TargetObjects $targets
DeletedDateTime Id                                   AppDisplayName  DataType IsSyncedFromOnPremises Name                                                    TargetObjects
--------------- --                                   --------------  -------- ---------------------- ----                                                    -------------
                11112222-bbbb-3333-cccc-4444dddd5555 My new test app String   False                  extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User}

The example shows how to create an application extension property with the specified target objects for the specified object.

  • -ApplicationId parameter specifies the unique identifier of an application.
  • -Name parameter specifies the name of the extension property.
  • -TargetObjects parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase.

Parameters

-ApplicationId

Specifies a unique ID of an application in Microsoft Entra ID.

Parameter properties

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

Parameter sets

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

-DataType

Specifies the data type of the value the extension property can hold. Following values are supported.

  • Binary - 256 bytes maximum
  • Boolean
  • DateTime - Must be specified in ISO 8601 format. Will be stored in UTC.
  • Integer - 32-bit value.
  • LargeInteger - 64-bit value.
  • String - 256 characters maximum

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

-IsMultiValued

Specifies whether the extension property supports multiple values. Set this parameter to $true if the extension property can hold multiple values; otherwise, set it to $false.

Parameter properties

Type:System.Boolean
Default value:False
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

-Name

Specifies the name of the extension property.

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

-TargetObjects

Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported.

  • User
  • Group
  • AdministrativeUnit
  • Application
  • Device
  • Organization

Parameter properties

Type:

System.Collections.Generic.List`1[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

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.