'Azure hashing the sub claim in a JWT - how can I recreate the hashing logic?

Azure ADFS is using a method to hash the sub claim of a JWT when using their oAuth2.0 capabilities as an IDP server.

The hash is made of the client id and a unique user identifier - I would like to recreate that hashing logic but can't find anywhere on Azure documentation that says how this hash logic works or if there is a way to unhash it from Azure / have it sent unhashed or any other suggestion that helps me be able to get this value on the front-end.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source