Search code examples
oracle-cloud-infrastructureoci-go-sdk

How to list users from all Identity Domains in Oracle Cloud Infrastructure?


I need to retrieve a list of all users present in my Oracle Cloud environment via REST API or Go SDK.

Looking at the REST API docs, the Go SDK docs, and the OCI CLI docs, nowhere seems to provide an option to supply Identity Domain as an argument.

oci iam user list returns only the set of users present in the "Default" domain, even when I authenticate as a user in another domain.

Is there a way to fetch users from other Identity Domains?


Solution

  • Here is the REST API doc to list all users in the identity domain:

    https://docs.oracle.com/en/cloud/paas/iam-domains-rest-api/op-admin-v1-users-get.html

    Also, please use the domain URL for the API endpoint? Something like this: https://{domainUrl}/admin/v1/Users).

    Unfortunately, we have Go SDK (or other SDKs and CLI) support only for IAM resources but not for Identity Domains (IDCS).

    Thanks.