Azure AD B2C does not currently support appRole, such as user flows or custom policy. Reference: similar answers.
However, you can use Azure AD based authentication to grant appRole because Azure AD supports appRole. First, make sure you have added appRoles in your API application's manifest, then click Managed application in local directory to go to Enterprise Applications>Users and groups>Add user/group.
Next use an Azure AD based authentication flow such as ROPC flow or auth code flow.
Parse the token and you will see your custom role.
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.