error:Claim 'bearer' specified for the bearer token is not present in the available claims. while acquireing the access token with client credentials

Code Bit 81 Reputation points
2021-10-11T04:10:56.92+00:00

i have b2c registered web app and using custom policies to sign in sign up i want to add a call to my secure web API to send user claims to this API. i have followed this documentation Secure your API and access through custom policy and using OAuth2 bearer authentication. for this i have registered another application(Client Application(daemon app) )to get the access token as the above documentation says, but i am not getting any bearer token in bearer token claim(access token). i am getting this following specific error(in jwt.ms) when running my policy

error:Claim "bearerToken" specified for the bearer token is not present in the available claims.

i need some guidance how to register my API in azure and what configuration i need to add in my asp.net core api code to get secured. and what do i need to add in the scope(expose API) while registering the api in azure. any help will be much appreciated.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,655 questions
{count} votes