diff --git a/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py b/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py index ad799308c2b6..faf7b16e052e 100644 --- a/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py +++ b/azure-keyvault/azure/keyvault/custom/key_vault_authentication.py @@ -123,7 +123,11 @@ def set_authorization_header(self, request, challenge): challenge.get_authorization_server(), challenge.get_resource(), challenge.get_scope()) - request.headers['Authorization'] = '{} {}'.format(auth[0], auth[1]) + + # Due to limitations in the service we hard code the auth scheme to 'Bearer' as the service will fail with any other + # scheme or a different casing such as 'bearer', once this is fixed the following line should be replace with: + # request.headers['Authorization'] = '{} {}'.format(auth[0], auth[1]) + request.headers['Authorization'] = '{} {}'.format('Bearer', auth[1]) class KeyVaultAuthentication(OAuthTokenAuthentication):