unable to create next dependency in intune

Viewed 23

i have problem with create more dependencies for win32 app in intune. If i want create or update one dependency i use "updaterelationships" but i need create second dependency i have problem with "relationships". How to add second dependency to intune ?

 $Dependency = [ordered]@{
        "@odata.type" = "#microsoft.graph.mobileAppDependency"
        "dependencyType" = "Detect"
        "targetId" = $ID2
        #"targetDisplayName"= "Target Display Name value"
        #"targetDisplayVersion"= "Target Display Version value"
        #"targetPublisher"= "Target Publisher value"
        #"targetType"= "parent"
        #"dependencyType"= "autoInstall"
        #"dependentAppCount"= 1
        #"dependsOnAppCount"= 1
     }

     $Win32AppRelationships = [ordered]@{
        "relationships" = @($Dependency)
     }
        $uri = "https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/$ID/updaterelationships"
        Invoke-RestMethod -Uri $uri -Headers $authToken -Method Post -Body ($Win32AppRelationships | ConvertTo-Json)  -ContentType "application/json"
    }

Response if i use only "relationships" according to https://docs.microsoft.com/en-us/graph/api/intune-apps-mobileappdependency-create?view=graph-rest-beta

Response content:
{"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_2208/StatelessAppMetadataFEService/deviceAppManagement/mobileApps
0 Answers
Related