How to deactivate and reactivate user in Azure AD B2C

9.8k views Asked by At

Is there any way to deactivate and reactivate Azure AD B2C user. I want to implement functionality which toggles Azure AD user status.

1

There are 1 answers

4
Saca On BEST ANSWER

If by "deactivate and reactivate" you mean prevent the user from signing in. This is currently only possible for local accounts (not accounts from social providers: Facebook, Google, etc).

You can achieve this by either:

  1. The Azure portal, Users and Groups blade > Profile > Settings, Block sign in. Profile Blade screenshot

  2. The Microsoft Graph, by sending a PATCH request to the beta/users/ and setting the 'accountEnabled' property to false. More info here: https://learn.microsoft.com/en-us/graph/api/user-update Graph Patch User accountEnabled screenshot

If you'd like to be able to disable sign-in for social accounts as well, vote for the "B2C Block sign in for social accounts" idea in the feedback forum.