From 721566c168f8ffa1af3c64498bff82a7c6c57486 Mon Sep 17 00:00:00 2001 From: WinDino <36110475+WinDino@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:28:10 +0200 Subject: [PATCH] Updated and fixed the paths Based on the official documentation: https://learn.microsoft.com/en-us/graph/api/user-delete?view=graph-rest-1.0&tabs=http --- microsoft-identity-and-access/1.0.0/src/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft-identity-and-access/1.0.0/src/app.py b/microsoft-identity-and-access/1.0.0/src/app.py index 19f7729f..59b0628a 100644 --- a/microsoft-identity-and-access/1.0.0/src/app.py +++ b/microsoft-identity-and-access/1.0.0/src/app.py @@ -134,7 +134,7 @@ def disable_user(self, tenant_id, client_id, client_secret, user_email_or_id): return {"success": False, "reason": "Couldn't find any password methods to reset password, but DID revoke their sessions (2)"} registered_password_id = retdata["value"][0]["id"] - graph_url = f"https://graph.microsoft.com/v1.0/users/{user_email_or_id}/authentication/passwordMethods/{registered_password_id}/resetPassword" + graph_url = f"https://graph.microsoft.com/v1.0/users/{user_email_or_id}/authentication/methods/{registered_password_id}/resetPassword" headers = { "Content-type": "application/json" } @@ -480,7 +480,7 @@ def reset_user_password(self, tenant_id, client_id, client_secret, user_email_or graph_url = "https://graph.microsoft.com" session = self.authenticate(tenant_id, client_id, client_secret, graph_url) - graph_url = f"https://graph.microsoft.com/beta/users/{user_email_or_id}/authentication/passwordMethods/{registered_password_id}/resetPassword" + graph_url = f"https://graph.microsoft.com/beta/users/{user_email_or_id}/authentication/methods/{registered_password_id}/resetPassword" headers = { "Content-type": "application/json"