共用方式為


ReceivedInvitationsClient.GetReceivedInvitations Method

Definition

Lists the received invitations.

public virtual Azure.Pageable<BinaryData> GetReceivedInvitations (string skipToken = default, string filter = default, string orderby = default, Azure.RequestContext context = default);
abstract member GetReceivedInvitations : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetReceivedInvitations : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetReceivedInvitations (Optional skipToken As String = Nothing, Optional filter As String = Nothing, Optional orderby As String = Nothing, Optional context As RequestContext = Nothing) As Pageable(Of BinaryData)

Parameters

skipToken
String

The continuation token to list the next page.

filter
String

Filters the results using OData syntax.

orderby
String

Sorts the results using OData syntax.

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 GetReceivedInvitations and parse the result.

var credential = new DefaultAzureCredential();
var client = new ReceivedInvitationsClient("<https://my-service.azure.com>", credential);

foreach (var data in client.GetReceivedInvitations())
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.ToString());
}

This sample shows how to call GetReceivedInvitations with all parameters, and how to parse the result.

var credential = new DefaultAzureCredential();
var client = new ReceivedInvitationsClient("<https://my-service.azure.com>", credential);

foreach (var data in client.GetReceivedInvitations("<skipToken>", "<filter>", "<orderby>"))
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("type").ToString());
    Console.WriteLine(result.GetProperty("invitationKind").ToString());
}

Remarks

List received invitations

Below is the JSON schema for one item in the pageable response.

Response Body:

Schema for ReceivedInvitationListValue:

{
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              invitationKind: "User" | "Application", # Required. The types of invitations.
            }

Applies to