New-EntraApplicationExtensionProperty

Creates an application extension property.

Syntax

New-EntraApplicationExtensionProperty
   -ApplicationId <String>
   -Name <String>
   [-DataType <String>]
   [-TargetObjects <System.Collections.Generic.List`1[System.String]>]
   [<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.

Type:System.String
Aliases:ObjectId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters: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
Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the extension property.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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
Type:System.Collections.Generic.List`1[System.String]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False