# Not able to access or download blobs from azure storage with service principal credentials

**URL:** <https://forum.ansible.com/t/not-able-to-access-or-download-blobs-from-azure-storage-with-service-principal-credentials/30843>\
**Category:** AWX Project\
**Tags:** azure, awx\
**Created:** [July 23, 2019, 8:58am UTC](https://forum.ansible.com/t/not-able-to-access-or-download-blobs-from-azure-storage-with-service-principal-credentials/30843 "2019-07-23T08:58:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamlightsocialxen](https://avatars.discourse-cdn.com/v4/letter/i/ee59a6/32.png) [@iamlightsocialxen](https://forum.ansible.com/u/iamlightsocialxen)\
**Post date:** [July 23, 2019, 8:58am UTC](https://forum.ansible.com/t/not-able-to-access-or-download-blobs-from-azure-storage-with-service-principal-credentials/30843/1 "2019-07-23T08:58:35Z")

</div>

Hello Experts ,

I am trying to download/upload blobs with ansible azure\_rm\_storageblob module in AWX ( I have tried in Ansible core too, got the same error) , and get below error

Error getting keys for account XXXXXXXXX - Azure Error: AuthorizationFailed\nMessage: The client ‘YYYYYYYYYYYYYYYYYYYYYY’ with object id ‘YYYYYYYYYYYYYYYYYYYYYYYYY’ does not have authorization to perform action ‘Microsoft.Storage/storageAccounts/listKeys/action’ over scope ‘/subscriptions/ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ/resourceGroups/RG-DataEngineering-Dev/providers/Microsoft.Storage/storageAccounts/XXXXXXXXXXXXXX’ or the scope is invalid. If access was recently granted, please refresh your credentials."

If I use the same service principal key in the python code , I am able to upload and download blobs without any error .

I am wondering , when using service pricipal authentication with Azure , why it is doing listKeys operation.

I hope someone will understand this issue or might have faced this, looking to hear back from them.

regards,  
Prakash.

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [July 23, 2019, 2:45pm UTC](https://forum.ansible.com/t/not-able-to-access-or-download-blobs-from-azure-storage-with-service-principal-credentials/30843/2 "2019-07-23T14:45:38Z")

</div>

This sounds like a question for the Ansible core group that manages the azure\_rm\_storageblob module. You can see information on who maintains this at the bottom of the docs page on it: [https://docs.ansible.com/ansible/latest/modules/azure\_rm\_storageblob\_module.html#status](https://docs.ansible.com/ansible/latest/modules/azure_rm_storageblob_module.html#status)

This mailing list is specifically for the AWX project.

---

<div class="post-metadata">

**Author:** ![iamlightsocialxen](https://avatars.discourse-cdn.com/v4/letter/i/ee59a6/32.png) [@iamlightsocialxen](https://forum.ansible.com/u/iamlightsocialxen)\
**Post date:** [July 24, 2019, 7:12am UTC](https://forum.ansible.com/t/not-able-to-access-or-download-blobs-from-azure-storage-with-service-principal-credentials/30843/3 "2019-07-24T07:12:29Z")

</div>

Kiitos.
