AzureAD B2C - User Enable/Disable - Lock/Unlock

juni dev 331 Reputation points


I need to create an API for B2C users management.
I'm going to use ms graph to do Enable/Disable user on demand.
I was also asked to create API operations for user Lock/Unlock but I do not see this available o ms graph. Is there a lock/unlock attribute or similar besides de AccountEnabled?

what about the smartlockout, can that be read/set?


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
1,319 questions
Azure Active Directory External Identities
Microsoft Graph Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
725 questions
Microsoft Graph Identity API
Microsoft Graph Identity API
A Microsoft API to access Azure Active Directory (Azure AD) resources to enable scenarios like managing administrator (directory) roles, inviting external users to an organization, and, if you are a Cloud Solution Provider (CSP), managing your customer's data.
285 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 23,346 Reputation points

    Hi @juni dev

    The graph API does not provide an endpoint for Lock/Unlock b2c users. To prevent user accounts from being locked out by an attacker, Azure B2C's password protection feature can set up smart lockout, but this feature is currently limited to the portal and cannot be read/set via the graph API.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful