Hi @Nikhil Patil ,
Thanks for reaching out.
API connector is the feature provided by B2C to enhance the Sign-Up experience of the user to integrate with REST API. Once API Connector is configured to use with specific user flow, whenever a user reaches the specific step, the API is invoked with user’s claim information as key-value pair in json body. API makes the required process and send the response to the B2C.
It can only be used with below steps in B2C user flow where you can enable API connector:
- After sign-up with an identity provider
- Before creating the user
- Before sending the token
So, during above steps in user flow, you can enable API connector to call REST API to integrate with external system i.e to validate user input, run some business logic.
Unfortunately, it seems you are looking for other way round to call the user flow from your WebAPI through API connector as a http request which is not possible. The REST API service must be published to a publicly accessible HTTPS endpoint. The request to your REST API service comes from Azure AD B2C servers.
In a user flow, you can protect your API endpoint by using either HTTP basic authentication or HTTPS client certificate authentication only.
Reference links: https://learn.microsoft.com/en-us/azure/active-directory-b2c/api-connectors-overview?pivots=b2c-user-flow
Hope this will help.
Thanks,
Shweta
-------------------------------
Please remember to "Accept Answer" if answer helped you.