Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions microsoft-intune/1.0.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down