Fetch all tenants using Identity API V2

asked 2016-01-05 07:16:15 -0600

Yaron Yogev gravatar image

updated 2016-01-05 08:36:48 -0600

I am trying to fetch the list of all tenants using OpenStack identity API V2.0. I have an "admin" user, which I made a user and administrator in all tenants. If I authenticate to public URL (port 5000), and then make the /v2.0/tenants GET call, I receive only the "admin" tenant in the response. The "admin" project is specified as the primary project for user "admin" in the Horizon UI.

I tried to follow the suggestion https://ask.openstack.org/en/question/160/openstack-apis-and-admin-user/?answer=236#post-id-236 (in this thread), but all that gave me was just one other tenant: the "services" tenant which appears in the distribution I'm using at the moment (Mirantis).

Is this the correct way to do this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-05 10:20:02 -0600

updated 2016-01-05 10:20:41 -0600


If you make a request against port 35357 (admin) instead of 5000 (public/internal) you receive a list of all tenants. Also, you can check in which tenants a user is in with the script in this site:



edit flag offensive delete link more


Hello Eduardo, thanks for your reply. the script (w/some fixes) shows the user has admin role in all tenants. If I try to authenticate to port 35357 using Identity API V2, I get "401 Unauthorized". If do the /tenants API call to 35357 after authenticating to port 5000, I get only "admin" again.

Yaron Yogev gravatar imageYaron Yogev ( 2016-01-06 01:07:25 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-01-05 07:16:15 -0600

Seen: 110 times

Last updated: Jan 05 '16