How do I transform a claim to a HMACSHA256 based token

andrewz 20 Reputation points

I am creating a custom policy to use Azure B2C as an IdP to integrate with a legacy authentication service. The legacy service and the new IdP share a secret.

The legacy authentication service has a custom authentication flow and requires that a HMACSHA256 based challenge token is sent to it as part of its authentication process using the shared secret as the key.

I am unable to find a way to create / transform a token to a HMACSHA256 based output claim. What are the recommended patterns to address a situation such as mine ?

I tried but the computed hashes do not match since the hashing function is not a HMACSHA256.

Azure Active Directory External Identities
{count} votes

Accepted answer
  1. Shweta Mathur 13,096 Reputation points Microsoft Employee

    Hi @andrewz ,

    Thanks for reaching out and thank you for your time and patience.

    Unfortunately, Azure AD B2C doesn't create or transform HMACSHA254 token.

    Also, it is not possible to do transformations on the resulting token. Claim transformation will only apply to claims in the claims bag.

    You can post this idea at the Azure Feedback Portal, which is monitored by the product team for feature enhancements.

    Hope this will help.



    Please remember to "Accept Answer" if answer helped you.

0 additional answers

Sort by: Oldest