-
Notifications
You must be signed in to change notification settings - Fork 217
Description
Describe the bug
I am trying to set up supersedence for an Intune Win32 app, using the documentation as listed here:
Create mobileAppSupersedence
New-MgBetaDeviceAppManagementMobileAppRelationship
I've tried both methods - assuming the second one is the recommended method. Both produced the same result, which is as follows:
Status: 400 (BadRequest) ErrorCode: No method match route template
No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /AppLifecycle_2412/StatelessAppMetadataFEService/deviceAppManagement/mobileApps('{$AppID}')/relationships.
I have confirmed that the IDs for both the parent and child apps are correct. I have also attempted to use the JSON output from Get-MgBetaDeviceApp... as the body parameter, thinking my JSON was incorrect, but that fails with the same error.
This error also happens if I try to use Graph Explorer directly.
Expected behavior
I send a POST request to the endpoint, and it returns a 201 code and adds an app supersedence listing based on the IDs provided. (Alternatively, I use the MgBeta cmdlet with the correct data, and it adds an app supersedence listing.)
How to reproduce
- Prepare $AppId and $TargetAppId as two separate valid Intune apps
- Execute
New-MgBetaDeviceAppManagementMobileAppRelationship -MobileAppId $AppId -TargetId $TargetAppId -TargetType 'child' - Alternatively, execute
Invoke-MgGraphRequest -Uri 'https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{$AppId}/relationships'with a valid JSON body parameter
SDK Version
2.25.0
Latest version known to work for scenario above?
No response
Known Workarounds
Add the supersedence manually in the Intune web GUI.
Debug output
DEBUG: [CmdletBeginProcessing]: - New-MgBetaDeviceAppManagementMobileAppRelationship begin processing with parameterSet 'CreateExpanded1'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'snip'.
DEBUG: [Authentication]: - Scopes: [AuditLog.Read.All, DeviceManagementApps.Read.All, DeviceManagementApps.ReadWrite.All, DeviceManagementConfiguration.Read.All, DeviceManagementConfiguration.ReadWrite.All, DeviceManagementManagedDevices.PrivilegedOperations.All, DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All, DeviceManagementServiceConfig.Read.All, DeviceManagementServiceConfig.ReadWrite.All, Directory.AccessAsUser.All, Directory.ReadWrite.All, email, Group.ReadWrite.All, openid, profile, User.Read].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
POST
Absolute Uri:
https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/$AppId/relationships
Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-GB),PowerShell/7.4.6
Accept-Encoding : gzip
SdkVersion : graph-powershell-beta/2.25.0
client-request-id : snip
Body:
{
"SupersedenceType": "update",
"targetId": "$TargetId",
"targetType": "child"
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : snip
client-request-id : snip
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"003","RoleInstance":"snip"}}
Date : Thu, 30 Jan 2025 15:12:47 GMT
Body:
{
"error": {
"code": "No method match route template",
"message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /AppLifecycle_2412/StatelessAppMetadataFEService/deviceAppManagement/mobileApps('$AppId')/relationships.",
"innerError": {
"date": "2025-01-30T15:12:47",
"request-id": "snip",
"client-request-id": "snip"
}
}
}
New-MgBetaDeviceAppManagementMobileAppRelationship_CreateExpanded1: script.ps1:55
Line |
55 | New-MgBetaDeviceAppManagementMobileAppRelationship @splat -Deb …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request
| /AppLifecycle_2412/StatelessAppMetadataFEService/deviceAppManagement/mobileApps('$AppId')/relationships. Status: 400 (BadRequest) ErrorCode: No method match route
| template Date: 2025-01-30T15:12:47 Headers: Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id :
| snip client-request-id : snip x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"UK
| South","Slice":"E","Ring":"5","ScaleUnit":"003","RoleInstance":"snip"}} Date : Thu, 30 Jan 2025 15:12:47 GMT
DEBUG: [CmdletEndProcessing]: - New-MgBetaDeviceAppManagementMobileAppRelationship end processing.
Configuration
- OS: Windows 11 23H2 (also tried on 24H2)
- Arch: AMD64
- SDK: Graph Beta 2.25.0
PSVersionTable:
Name Value
---- -----
PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.22631
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