Is there any way to deactivate and reactivate Azure AD B2C user. I want to implement functionality which toggles Azure AD user status.
问题:
回答1:
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:
The Azure portal, Users and Groups blade > Profile > Settings, Block sign in.
The Microsoft Graph, by sending a PATCH request to the beta/users/ and setting the 'accountEnabled' property to false. More info here: https://graph.microsoft.io/en-us/docs/api-reference/beta/api/user_update
If you'd like to be able to disable sign-in for social accounts as well, I'd recommend you create an entry in the Azure AD B2C UserVoice forum requesting this feature:
https://feedback.azure.com/forums/169401-azure-active-directory/category/160596-b2c