AADSTS50138: Encryption key environment is not valid
The encryption key environment is not valid.
What to check
- Check that the app and the key belong to the intended cloud and environment.
Official reference
Microsoft Learn: AADSTS error codes
Microsoft error lookup
Message summary: The encryption key environment is not valid.
Microsoft does not provide a separate remediation in the lookup.