# azure\_rm\_virtualmachine\_facts not working to search on Tags

**URL:** <https://forum.ansible.com/t/azure-rm-virtualmachine-facts-not-working-to-search-on-tags/29904>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [March 18, 2019, 4:05pm UTC](https://forum.ansible.com/t/azure-rm-virtualmachine-facts-not-working-to-search-on-tags/29904 "2019-03-18T16:05:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashwini\_Patil](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Ashwini\_Patil](https://forum.ansible.com/u/Ashwini_Patil)\
**Post date:** [March 18, 2019, 4:05pm UTC](https://forum.ansible.com/t/azure-rm-virtualmachine-facts-not-working-to-search-on-tags/29904/1 "2019-03-18T16:05:59Z")

</div>

I am having trouble working with this module. The requirement is to search all the VMs irrespective of their resource groups based on the tags applied to VMs. The module documentation [here](https://docs.ansible.com/ansible/latest/modules/azure_rm_virtualmachine_facts_module.html) says  
`  
resource\_group : Name of the resource group containing the virtual machines (required when filtering by vm name).

`

It’s throwing me error from one of the files - /.local/lib/python2.7/site-packages/azure/mgmt/compute/compute/v2017\_03\_30/operations/virtual\_machines\_operations.py from azure-sdk-for-python:

`  
File "/home/svc\_ucoansible/.local/lib/python2.7/site-packages/azure/mgmt/compute/compute/v2017\_03\_30/operations/virtual\_machines\_operations.py", line 664, in internal\_paging\n ‘resourceGroupName’: self.\_serialize.url("resource\_group\_name", resource\_group\_name, ‘str’),\n File "/home/svc\_ucoansible/.local/lib/python2.7/site-packages/msrest/serialization.py", line 488, in url\n data = self.validate(data, name, required=True, \*\*kwargs)\n File "/home/svc\_ucoansible/.local/lib/python2.7/site-packages/msrest/serialization.py", line 558, in validate\n raise ValidationError("required", name, True)\nmsrest.exceptions.ValidationError: Parameter ‘resource\_group\_name’ can not be None.\n",  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 1

`

Can somebody please help here ?
