Failed to create managed identity token post upgrade to Vault 2.2.0

Hello there,

After upgrading Vault from version 1.21.4 to 2.2.0, despite the upgrade being successful, we noticed several terraform Vault resources started failing with the error below after terraform was initialised.

 Error: Error making API request.

 Code: 500. Errors:

 * failed to create managed identity token credential: empty managedidentity.UserAssignedClientID

Tried to see if we can use a token with elevated permissions to perform a write operation to update the missing client_id output, however, nobody seems to have the required permissions to apply this fix.

The tokens we have available are unable to initiate a root token generation operation because they don’t have elevated permissions either.

Please can someone help us with what can we do in this situation?

Thank you very much!

1 Like

no idea but a few things you could try:

  • Inject the AZURE_CLIENT_ID environment variable directly into the runtime environment of your Vault servers/containers…quick and easy, might work.
  • manual backend shit…even if you can’t find the keys to the front door, if you have access to the backend storing the data for vault you could probably figure out how to insert the client id string directly into the backend
  • surely you still have the original unseal keys, you should be able to use them in conjunction with vault operator generate-rootto generate a new root token you can use to fix your issue and it requires no existing token permissions.

let us know if any of that works out for you!