diff --git a/microsoft-intune/1.0.0/src/app.py b/microsoft-intune/1.0.0/src/app.py index 5b154431..3f1ac2d0 100644 --- a/microsoft-intune/1.0.0/src/app.py +++ b/microsoft-intune/1.0.0/src/app.py @@ -48,7 +48,7 @@ def authenticate(self, tenant_id, client_id, client_secret, graph_url): def list_devices(self, tenant_id, client_id, client_secret): graph_url="https://graph.microsoft.com" session = self.authenticate(tenant_id, client_id, client_secret, graph_url) - graph_url = "https://graph.microsoft.com/v1.0/devices/" + graph_url = "https://graph.microsoft.com/v1.0/devices" ret = session.get(graph_url) return ret.text @@ -76,28 +76,28 @@ def managed_device(self, tenant_id, client_id, client_secret): def get_managed_device(self, tenant_id, client_id, client_secret, managedDeviceId): graph_url="https://graph.microsoft.com" session = self.authenticate(tenant_id, client_id, client_secret, graph_url) - graph_url=f"https://graph.microsoft.com/v1.0/managedDevices/{managedDeviceId}" + graph_url=f"https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{managedDeviceId}" ret = session.get(graph_url) return ret.text def delete_managed_device(self, tenant_id, client_id, client_secret, managedDeviceId): graph_url="https://graph.microsoft.com" session = self.authenticate(tenant_id, client_id, client_secret, graph_url) - graph_url=f"https://graph.microsoft.com/v1.0/managedDevices/{managedDeviceId}" + graph_url=f"https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{managedDeviceId}" ret = session.delete(graph_url) return ret.text def remotelock(self, tenant_id, client_id, client_secret, managedDeviceId): graph_url="https://graph.microsoft.com" session = self.authenticate(tenant_id, client_id, client_secret, graph_url) - graph_url=f"https://graph.microsoft.com/v1.0/managedDevices/{managedDeviceId}/remoteLock" + graph_url=f"https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{managedDeviceId}/remoteLock" ret = session.post(graph_url) return ret.text def shutdown(self, tenant_id, client_id, client_secret, managedDeviceId): graph_url="https://graph.microsoft.com" session = self.authenticate(tenant_id, client_id, client_secret, graph_url) - graph_url=f"https://graph.microsoft.com/v1.0/managedDevices/{managedDeviceId}/shutDown" + graph_url=f"https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{managedDeviceId}/shutDown" ret = session.post(graph_url) return ret.text