New-EntraApplicationExtensionProperty
Creates an application extension property.
Syntax
New-EntraApplicationExtensionProperty
-ObjectId <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
PS C:\>New-EntraApplicationExtensionProperty -ObjectID "3ddd22e7-a150-4bb3-b100-e410dea1cb84" -Name "NewAttribute"
DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects
--------------- -- -------------- -------- ---------------------- ---- -------------
d083d12d-c280-4a23-a644-b4e71a09a4cb my new test app String False extension_ec5edf3fe79749dd8d1e7760a1c1c943_NewAttribute {}
This command creates an application extension property of the string type for the specified object.
Example 2: Create an extension property with data type parameter
PS C:\>New-EntraApplicationExtensionProperty -ObjectID "3ddd22e7-a150-4bb3-b100-e410dea1cb84" -Name "NewAttribute" -DataType "boolean"
DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects
--------------- -- -------------- -------- ---------------------- ---- -------------
d083d12d-c280-4a23-a644-b4e71a09a4cb my new test app Boolean False extension_ec5edf3fe79749dd8d1e7760a1c1c943_NewAttribute {}
This command creates an application extension property of the specified data type for the specified object.
Example 3: Create an extension property with targets parameter
PS C:\>$targets = New-Object System.Collections.Generic.List[System.String]
PS C:\>$targets.Add('User')
PS C:\>New-EntraApplicationExtensionProperty -ObjectID "3ddd22e7-a150-4bb3-b100-e410dea1cb84" -Name "NewAttribute" -TargetObjects $targets
DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects
--------------- -- -------------- -------- ---------------------- ---- -------------
d083d12d-c280-4a23-a644-b4e71a09a4cb my new test app String False extension_ec5edf3fe79749dd8d1e7760a1c1c943_NewAttribute {User}
The first command initializes new generic string list collection.
The second command adds an item to the list.
The final command creates an application extension property with the specified target objects for the specified object.
Parameters
-DataType
Specifies the data type of the extension property.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the data type of the extension property.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ObjectId
Specifies a unique ID of an application in Microsoft Entra ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetObjects
Specifies target objects.
Type: | System.Collections.Generic.List`1[System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for