No OData route exists that match template
Lionel Boyomo Keedi
15
Reputation points
Hello
I want to attach a group to configuration using beta api https://learn.microsoft.com/en-us/graph/api/intune-deviceconfig-deviceconfigurationgroupassignment-create?view=graph-rest-beta
I therefore use followiung api call :
token = await self.get_app_only_token()
url = 'https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations/{}/groupAssignments'.format(device_configuration_id)
print(url)
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
payload = {
"targetGroupId": group_id
}
response = requests.post(url, headers=headers, json=payload)
But fall down to this error
{"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 /{id}/StatelessDeviceConfigurationFEService/deviceManagement/deviceConfigurations('{device_id}')/groupAssignments.",
"innerError":{"date":"2024-07-24T10:53:00","request-id":"e5712f33-9a16-41c1-aa4a-59510aec1199","client-request-id":"e5712f33-9a16-41c1-aa4a-59510aec1199"}
}
}
I deep dive accross multiple forums wihtout success
Can anyone please help ?
Microsoft Security | Microsoft Graph
Sign in to answer