How to get a domain scoped token

asked 2016-05-08 05:13:22 -0500

SGG gravatar image

Hi everyone.

I have created a new domain domain1 and created a new user user1 in that domain. Then I have assigned the admin role to that user1 with domain1.

$ openstack domain create domain1
$ openstack user create --password password --domain domain1 user1
$ openstack role add --user user1 --domain domain1 --user-domain admin

When I try to get a token, it's returning error.

$ export OS_AUTH_URL=
$ export OS_DEFAULT_DOMAIN=domain1
$ export OS_USERNAME=user1
$ export OS_PASSWORD=password
$ export OS_DOMAIN_NAME=domain1

$ openstack token isuue
The request you have made requires authentication. (HTTP 401) (Request-ID: req-f9d0ae81-84ba-41cd-855d-aa37c84eca72)

But if I try to get token using ReST API with domain scope, it's working fine.

How do I get the domain scoped token from the opentsack CLI?

edit retag flag offensive close merge delete


@SGG - I'd recommend running with --debug to check what endpoints are triggered and what is passed there.

yprokule gravatar imageyprokule ( 2016-05-09 01:26:37 -0500 )edit

Did you solve it?

theque42 gravatar imagetheque42 ( 2016-10-28 02:57:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-28 17:37:51 -0500

edmondsw gravatar image

export OS_USER_DOMAIN_NAME=domain1

You've also got a typo there... try openstack token issue

And as yprokule commented, if things are still failing, add --debug and you'll get a lot more information output to help determine the problem.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2016-05-08 05:13:22 -0500

Seen: 801 times

Last updated: May 08 '16