Azure python request to change password policies

ayberk.halac 0 Reputation points
2023-03-09T07:04:47.5633333+00:00

Hello,

How can I access this request from graph api or azure sdk -> /api/PasswordReset/PasswordResetPolicies?getPasswordResetEnabledGroup=false

I want to change password reset policies from my code but I couldnt find any choices except requesting directly to api.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,461 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,308 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2023-03-09T09:10:36.1966667+00:00

    Hi @ayberk.halac,

    Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account.

    POST /users/{id | userPrincipalName}/authentication/passwordMethods/{id}/resetPassword
    

    There is no mention of code or snipper for Python :https://learn.microsoft.com/en-us/graph/api/authenticationmethod-resetpassword?view=graph-rest-1.0&tabs=javascript#example-1-user-submitted-password

     


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments