Observed the same problem when the user is not an admin in openstack.
The openrc file downloaded from openstack hoirzon has OS_PROJECT_DOMAIN_ID but juju openstack provider looks for OS_PROJECT_DOMAIN_NAME and ignores OS_PROJECT_DOMAIN_ID [1].
[1] https://github.com/juju/juju/blob/develop/provider/openstack/credentials.go#L181-L189
Observed the same problem when the user is not an admin in openstack.
The openrc file downloaded from openstack hoirzon has OS_PROJECT_ DOMAIN_ ID but juju openstack provider looks for OS_PROJECT_ DOMAIN_ NAME and ignores OS_PROJECT_ DOMAIN_ ID [1].
[1] https:/ /github. com/juju/ juju/blob/ develop/ provider/ openstack/ credentials. go#L181- L189