This script is a handy helper that replaces tokens in B2C policies with actual values, and vice versa.
- Update the configuration in the script as needed.
- Run the script with
node b2c-token-replace.js
- Update your B2C policies to use the tokens. See the example policy in this repository.
- Set the
filePaths
to the policy files that you want to perform token replace on. - Set the values for
tenantName
,b2cExtensionsAppClientId
,b2cExtensionsAppObjectId
,proxyIdentityExperienceFrameworkClientId
,identityExperienceFrameworkClientId
, andapplicationInsightsInstrumentationKey
. - Set the
apply
flag totrue
to replace the tokens with the values, orfalse
to replace the values with the tokens.
Node.js must be installed on your machine.
Feel free to make contributions to the project.