Thanks for reaching out.
Could you please refer and validate the steps mentioned in https://github.com/AzureAD/microsoft-identity-web/wiki/Token-Decryption to encrypt the token.
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.