From b7091cb946ed657ae275c26dc5e110a3226101bb Mon Sep 17 00:00:00 2001 From: WinDino <36110475+WinDino@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:04:06 +0200 Subject: [PATCH] Updated and fixed the paths Based on the official documentation: https://learn.microsoft.com/en-us/graph/api/authenticationmethod-resetpassword?view=graph-rest-beta&tabs=http --- microsoft-security-oauth2/1.0.0/src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-security-oauth2/1.0.0/src/app.py b/microsoft-security-oauth2/1.0.0/src/app.py index 77d425d2..f6f968d7 100644 --- a/microsoft-security-oauth2/1.0.0/src/app.py +++ b/microsoft-security-oauth2/1.0.0/src/app.py @@ -36,7 +36,7 @@ def reset_password(self, access_token, refresh_token, userId, passwordId, newPas graph_url = "https://graph.microsoft.com" session = self.authenticate(access_token, refresh_token) - url = "https://graph.microsoft.com/beta/users/%s/authentication/passwordMethods/%s/resetPassword" % (userId, passwordId) + url = "https://graph.microsoft.com/beta/users/%s/authentication/methods/%s/resetPassword" % (userId, passwordId) response = session.post(url) print(response.status_code) return response.text