> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmo/how-to/list-all-application-stack-and-tenants-in-openstack-region.md).

# List All Application Stack And Tenants in OpenStack Region

## Problem

How to list all the application stack for the corresponding username and its tenants for an OpenStack region?

## Environment

* Platform9 Managed OpenStack - All Versions
* OpenStack Unified CLI

## Procedure

Follow the below steps to gather the requested information:

1. Source the **admin RC** file for your environment.

{% tabs %}
{% tab title="None" %}

```none
$ source [your_rc_file].rc
```

{% endtab %}
{% endtabs %}

2. Run the below script to capture data for region provided in the source file.

{% tabs %}
{% tab title="None" %}

```none
# Give +x permission to the script before executing.# Run this bash script on each tenant.echo -e "Application   \t\t\t User  \t\t\t Tenant"for name in $(openstack stack list --all | awk '{print$2}' | egrep -v ID)        do          stack_name=$(openstack stack show $name -c stack_name -f value 2> /dev/null)          if [[ $stack_name ]];          then          stack_user=$(openstack stack show $name | grep spg_adid | awk '{printf$4}')          stack_tenant=$(openstack stack show $name -c outputs | egrep -A1 "pf9_tenant" | egrep "output_value" | awk '{printf$4}')          echo -e "${stack_name}   \t ${stack_user}  \t ${stack_tenant}"         fi       done
```

{% endtab %}
{% endtabs %}

## Additional Information

You can refer the community documentation for more details on openstack CLI options.

* [Installing the OpenStack CLI](https://docs.platform9.com/openstack/cli-access/cli-overview/)
* [OpenStack Documentation](https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/server.html#server-list)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pmo/how-to/list-all-application-stack-and-tenants-in-openstack-region.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
