You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update-MgBetaDeviceAppManagementTargetedManagedAppConfigurationApp @params only works if you do not include 'apps' in the hashtable. Otherwise you will get the error:
"Update-MgBetaDeviceAppManagementTargetedManagedAppConfiguration : Cannot apply PATCH to navigation property 'apps' on entity type 'microsoft.management.services.api.targetedManagedAppConfiguration'.
Status: 400 (BadRequest)"
New-MgBetaDeviceAppManagementTargetedManagedAppConfigurationApp @params works fine, so presumably this is a bug.
It isn't obvious how to retrieve a valid {managedMobileApp-id}, but tried some app Ids retreived from the previous graph request (e.g 'com.asana.app.android') and also some bundleIds, but it comes up with:
"No OData route exists that match template ~/singleton/navigation/key/navigation/key with http verb GET for request /MAMAdmin_2412/MAMAdminFEService/deviceAppManagement/targetedManagedAppConfigurations
probably not surprising as i'd expect it to be a guid? However, there seems to be no way to retrieve a valid Id.
Graph explorer did reveal the Update-MgBetaDeviceAppManagementTargetedManagedAppConfigurationApp cmd-let, but that won't work without a valid {managedMobileApp-id}
Also tried retriving an Id using Get-MgBetaDeviceAppManagementMobileApp
Mostly fixes issue microsoft#5566 where the applications part of the policy was completely ignored.
Module will now detect drift when Apps are changed, and is able to correctly recreate the policy when deleted. There seems to be a problem with MgGraph that means for now, 'update' will not work. Added verbose message for now, left code that should do the 'update' commented out.
Issue has been reported here: microsoft#5671 and here https://feedbackportal.microsoft.com/feedback/idea/c0940cc8-d7da-ef11-95f6-0022484d7a88
dannyKBjj
added a commit
to dannyKBjj/Microsoft365DSC
that referenced
this issue
Jan 26, 2025
Update-MgBetaDeviceAppManagementTargetedManagedAppConfigurationApp @params only works if you do not include 'apps' in the hashtable. Otherwise you will get the error:
"Update-MgBetaDeviceAppManagementTargetedManagedAppConfiguration : Cannot apply PATCH to navigation property 'apps' on entity type 'microsoft.management.services.api.targetedManagedAppConfiguration'.
Status: 400 (BadRequest)"
New-MgBetaDeviceAppManagementTargetedManagedAppConfigurationApp @params works fine, so presumably this is a bug.
Used graph explorer to investigate:
https://graph.microsoft.com/v1.0/deviceAppManagement/targetedManagedAppConfigurations//apps/
retrieves the apps just fine.
There is another URI https://graph.microsoft.com/v1.0/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration-id}/apps/{managedMobileApp-id}
It isn't obvious how to retrieve a valid {managedMobileApp-id}, but tried some app Ids retreived from the previous graph request (e.g 'com.asana.app.android') and also some bundleIds, but it comes up with:
"No OData route exists that match template ~/singleton/navigation/key/navigation/key with http verb GET for request /MAMAdmin_2412/MAMAdminFEService/deviceAppManagement/targetedManagedAppConfigurations
probably not surprising as i'd expect it to be a guid? However, there seems to be no way to retrieve a valid Id.
Graph explorer did reveal the Update-MgBetaDeviceAppManagementTargetedManagedAppConfigurationApp cmd-let, but that won't work without a valid {managedMobileApp-id}
Also tried retriving an Id using Get-MgBetaDeviceAppManagementMobileApp
$mobileApp = Get-MgBetaDeviceAppManagementMobileApp | Where-object {$_.AdditionalProperties.bundleId -eq "com.asana.Asana"}
Same problem...
Can anyone help?!
The text was updated successfully, but these errors were encountered: