OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). 
/// See Where to Get the Tenancy's OCID and User's OCID.
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment).
See Where to Get the Tenancy's OCID and User's OCID.
Lists the users in your tenancy . You must specify your tenancy ' s OCID as the value for the compartment ID ( remember that the tenancy is simply the root compartment ) . See Where to Get the Tenancy ' s OCID and User ' s OCID .
public ListUsersResponse ListUsers(ListUsersRequest request)
        {
            var uriStr = $"{GetEndPoint(IdentityServices.Users, this.Region)}";
            var querys = request.GetOptionQuery();
            if (!string.IsNullOrEmpty(querys)) {
                uriStr = $"{uriStr}?{querys}";
            }
            var uri = new Uri(uriStr);
            using (var webResponse = this.RestClient.Get(uri))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new ListUsersResponse()
                {
                    Items = JsonSerializer.Deserialize<List<UserDetails>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcNextPage = webResponse.Headers.Get("opc-next-page")
                };
            }
        }
public ListUsersResponse ListUsers ( ListUsersRequest request ) { var uriStr = $" { GetEndPoint ( IdentityServices . Users , this . Region ) } " ; var querys = request . GetOptionQuery ( ) ; if ( ! string . IsNullOrEmpty ( querys ) ) { uriStr = $" { uriStr } ? { querys } " ; } var uri = new Uri ( uriStr ) ; using ( var webResponse = this . RestClient . Get ( uri ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new ListUsersResponse ( ) { Items = JsonSerializer . Deserialize < List < UserDetails > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcNextPage = webResponse . Headers . Get ( " " ) } ; } }
Lists the users in your tenancy.
Lists the users in your tenancy .
None
request
ListUsersRequest
None