-
Notifications
You must be signed in to change notification settings - Fork 212
Description
Describe the bug
When updating an application registration using the Microsoft Graph PowerShell SDK (Update-MgApplication), the api.acceptMappedClaims property cannot be set. The call executes successfully (returns 200 OK), but the property remains null in the application object.
This appears to be a serialization gap in the PowerShell SDK model (MicrosoftGraphApiApplication) where the property is not included in the request payload.
# App is single-tenant, with Application.ReadWrite.All granted
$app = Get-MgApplication -Filter "displayName eq 'TestApp'"
# Attempt 1
Update-MgApplication -ApplicationId $app.Id -BodyParameter @{
api = @{
acceptMappedClaims = $true
}
}
# Attempt 2 (alternate spelling found in SDK)
Update-MgApplication -ApplicationId $app.Id -BodyParameter @{
api = @{
acceptMappedClaim = $true
}
}
Both calls succeed without error.
Verification with:
(Get-MgApplication -ApplicationId $app.Id).Api.AcceptMappedClaims
Works with direct Graph call:
Invoke-MgGraphRequest -Method PATCH `
-Uri "https://graph.microsoft.com/v1.0/applications/$($app.Id)" `
-Body '{"api":{"acceptMappedClaims":true}}'
Expected behavior
Update-MgApplication should serialize and send the api.acceptMappedClaims property in the PATCH request, allowing the field to be updated the same way it works via REST API.
How to reproduce
- Attempt to update the acceptMappedClaims property using Update-MgApplication
- Verify the property
- It has the old value
SDK Version
2.26.1
Latest version known to work for scenario above?
No response
Known Workarounds
Direct Graph call
Invoke-MgGraphRequest -Method PATCH `
-Uri "https://graph.microsoft.com/v1.0/applications/$($app.Id)" `
-Body '{"api":{"acceptMappedClaims":true}}'
Debug output
Click to expand log
```DEBUG: [CmdletBeginProcessing]: - Update-MgApplication begin processing with parameterSet 'Update'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [Application.ReadWrite.All, AppRoleAssignment.ReadWrite.All, DelegatedPermissionGrant.Read.All, DelegatedPermissionGrant.ReadWrite.All, Directory.AccessAsUser.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, openid, profile, RoleManagement.ReadWrite.Directory, Subscription.Read.All, User.Read, User.Read.All, email].
Confirm
Are you sure you want to perform this action?
Performing the operation "Update-MgApplication_Update" on target "Call remote 'PATCH /applications/{application-id}' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
PATCH
Absolute Uri:
https://graph.microsoft.com/v1.0/applications/{app-id}
Headers:
FeatureFlag : 00000003
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26100; en-IE),PowerShell/7.5.2
SdkVersion : graph-powershell/2.26.1
client-request-id : {client-request-id}
Accept-Encoding : gzip,deflate,br
Body:
{
"description": "Order API",
"displayName": "order-api",
"identifierUris": [
"{our-uri}"
],
"signInAudience": "AzureADMyOrg",
"tags": [
"main-application",
"auto-generated"
]
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
NoContent
Headers:
Cache-Control : no-cache
Strict-Transport-Security : max-age=31536000
request-id : {request-id}
client-request-id : {client-request-id}
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"006","RoleInstance":"DU6PEPF00025209"}}
x-ms-resource-unit : 1
Date : Mon, 22 Sep 2025 11:07:33 GMT
Body:
Configuration
Name Value
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Other information
No response