Skip to main content

AADSTS50138: Encryption key environment is not valid

The encryption key environment is not valid.

What to check​

  1. 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.

Open AADSTS50138 in Microsoft’s lookup