> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Cloud Query

## Background[​](#background "Direct link to Background")

The *Run Azure Cloud Query* Action performs [Steampipe queries](https://hub.steampipe.io/plugins/turbot/azure) on Azure resources with a powerful and simple PostgreSQL syntax.

For example, fetching all Active Directory guest users:

```
select  display_name,  user_principal_name,  mail,  user_type,  usage_locationfrom  azure_ad_userwhere  user_type = 'Guest';
```

A complicated action such as fetching the Active Directory Password Profiles of each users in your account:

```
select  display_name,  user_principal_name,  additional_properties -> 'passwordProfile' -> 'enforceChangePasswordPolicy' as enforce_change_password_policy,  additional_properties -> 'passwordProfile' -> 'forceChangePasswordNextLogin' as change_password_next_loginfrom  azure_ad_user;
```

A query to get a list of compute images where disk storage type is Premium\_LRS:

```
select  name,  split_part(disk -> 'managedDisk' ->> 'id', '/', 9) as disk_name,  disk ->> 'storageAccountType' as storage_account_type,  disk ->> 'diskSizeGB' as disk_size_gb,  disk ->> 'caching' as cachingfrom  azure_compute_image  cross join jsonb_array_elements(storage_profile_data_disks) as diskwhere  disk ->> 'storageAccountType' = 'Premium_LRS';
```

A full description of all existing tables and official examples are provided here:

* [The Official Azure Plugin Documentation](https://hub.steampipe.io/plugins/turbot/azure/tables)
* [The Blink Automation Library](https://library.blinkops.com/workflows?vendors=Azure\&level=basic)

<Info>
  Blink supports this Steampipe version: v0.45.0.
</Info>

## Action Parameters[​](#action-parameters "Direct link to Action Parameters")

| Parameter     | Description                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------- |
| SQL statement | The SQL query to execute against database resources. Use standard SQL syntax.               |
| Output format | The representation of the output result. The possible options are "Table", "CSV" or "JSON". |

<img src="https://mintcdn.com/blinkops-2/deay2AiePWJDKGEh/img/Actions/Steampipe/RunAzureCloudQuery.png?fit=max&auto=format&n=deay2AiePWJDKGEh&q=85&s=b86b6aae0a60f5dc15833060fa8ffe77" alt="RunAzureCloudQuery" width="888" height="396" data-path="img/Actions/Steampipe/RunAzureCloudQuery.png" />

<Note>
  This action does not support Azure Oauth connections.
</Note>
