# error while connecting Ansible Platform to azure tenant

**URL:** <https://forum.ansible.com/t/error-while-connecting-ansible-platform-to-azure-tenant/37053>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [August 31, 2022, 9:16am UTC](https://forum.ansible.com/t/error-while-connecting-ansible-platform-to-azure-tenant/37053 "2022-08-31T09:16:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahdi\_Idriss](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mahdi\_Idriss](https://forum.ansible.com/u/Mahdi_Idriss)\
**Post date:** [August 31, 2022, 9:16am UTC](https://forum.ansible.com/t/error-while-connecting-ansible-platform-to-azure-tenant/37053/1 "2022-08-31T09:16:10Z")

</div>

dears,

after adding credentials to Ansible to connect to azure from Azure Resource Manager (Sub ID, Cliend ID…) i m facing below error when trying to run the job:

ansible-inventory [core 2.12.6]

config file = /etc/ansible/ansible.cfg  
configured module search path = [‘/home/runner/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python3.8/site-packages/ansible  
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections:/usr/share/automation-controller/collections  
executable location = /usr/bin/ansible-inventory  
python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]  
jinja version = 2.10.3  
libyaml = True  
Using /etc/ansible/ansible.cfg as config file  
redirecting (type: inventory) ansible.builtin.azure\_rm to azure.azcollection.azure\_rm  
[WARNING]: \* Failed to parse /runner/inventory/azure\_rm.yml with auto plugin:  
a batched request failed with status code 403, url /subscriptions/cf487487-fa5e  
-49cc-90a3-a6-----------------/providers/Microsoft.Compute/virtualMachines  
File “/usr/lib/python3.8/site-packages/ansible/inventory/manager.py”, line 290, in parse\_source  
plugin.parse(self.\_inventory, self.\_loader, source, cache=cache)  
File “/usr/lib/python3.8/site-packages/ansible/plugins/inventory/auto.py”, line 58, in parse  
plugin.parse(inventory, loader, path, cache=cache)  
File “/usr/share/automation-controller/collections/ansible\_collections/azure/azcollection/plugins/inventory/azure\_rm.py”, line 219, in parse  
self.\_get\_hosts()  
File “/usr/share/automation-controller/collections/ansible\_collections/azure/azcollection/plugins/inventory/azure\_rm.py”, line 276, in \_get\_hosts  
self.\_process\_queue\_batch()  
File “/usr/share/automation-controller/collections/ansible\_collections/azure/azcollection/plugins/inventory/azure\_rm.py”, line 418, in \_process\_queue\_batch  
raise AnsibleError(“a batched request failed with status code {0}, url {1}”.format(status\_code, result.url))  
[WARNING]: Unable to parse /runner/inventory/azure\_rm.yml as an inventory  
source  
ERROR! No inventory was parsed, please check your configuration and options
