Hello @Alagendran Natarajan
Thanks for posting your query on Microsoft Q&A. In order to return custom attributes from API to IDP you could try Enrich tokens with claims from external sources using API connectors
Custom attributes exist in the extension_<extensions-app-id>_CustomAttribute format in the directory. Your API should expect to receive claims in this same serialized format. For more information on custom attributes, see Define custom attributes in Azure AD B2C.
- When the web API receives an HTTP request from Azure AD during a user flow, it can return a "continuation response."A continuation response indicates that the user flow should continue to the next step: issuing the token.
In a continuation response, the API can return additional claims. A claim returned by the API that you wish to return in the token must be a built-in claim or defined as a custom attribute and must be selected in the Application claims configuration of the user flow.
Example request sent to the API at this step
Example of a continuation response
Please do let me know if you have any further queries in the comments section.
Thanks,
Akshay Kaushik
Please "Accept the answer" and "Upvote" if the suggestion works as per your business need. This will help us and others in the community as well.