ConfidentialLedgerClient.GetUsers(RequestContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
[Protocol Method] Gets details on a list of users.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Pageable<BinaryData> GetUsers(Azure.RequestContext context = default);
abstract member GetUsers : Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetUsers : Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetUsers (Optional context As RequestContext = Nothing) As Pageable(Of BinaryData)
Parameters
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.
Exceptions
Service returned a non-success status code.
Examples
This sample shows how to call GetUsers and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential);
foreach (BinaryData item in client.GetUsers())
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("assignedRole").ToString());
}
This sample shows how to call GetUsers with all request content and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential);
foreach (BinaryData item in client.GetUsers())
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("assignedRole").ToString());
Console.WriteLine(result.GetProperty("userId").ToString());
}
Applies to
Azure SDK for .NET