共用方式為


ReceivedInvitationsClient.GetReceivedInvitationAsync Method

Definition

Gets the received invitation identified by name.

public virtual System.Threading.Tasks.Task<Azure.Response> GetReceivedInvitationAsync (string receivedInvitationName, Azure.RequestContext context = default);
abstract member GetReceivedInvitationAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetReceivedInvitationAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetReceivedInvitationAsync (receivedInvitationName As String, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

receivedInvitationName
String

Name of the received invitation.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service. Details of the response body schema are in the Remarks section below.

Exceptions

receivedInvitationName is null.

receivedInvitationName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetReceivedInvitationAsync with required parameters and parse the result.

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

Response response = await client.GetReceivedInvitationAsync("<receivedInvitationName>");

JsonElement result = JsonDocument.Parse(response.ContentStream).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

Get a received invitation

Below is the JSON schema for the response payload.

Response Body:

This method takes one of the JSON objects below as a payload. Please select a JSON object to view the schema for this.

ApplicationReceivedInvitationSchema for ApplicationReceivedInvitation:
{
              invitationKind: Application, # Required. The types of invitations.
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              properties: {
                description: string, # Optional. Description shared when the invitation was created
                expirationDate: string (ISO 8601 Format), # Optional. The expiration date for the received share created by accepting the invitation.
                invitationStatus: "Pending" | "Accepted" | "Rejected", # Optional. Status of the invitation.
                location: string, # Optional. Location of the invitation.
                receiverEmail: string, # Optional. Email of the user/receiver who received the sent share invitation
                receiverName: string, # Optional. Name of the user/receiver who received the sent share invitation
                receiverTenantName: string, # Optional. Tenant name of the user/receiver who received the sent share invitation
                respondedAt: string (ISO 8601 Format), # Optional. The time the recipient responded to the invitation.
                senderEmail: string, # Optional. Email of the sender who created the sent share invitation
                senderName: string, # Optional. Name of the sender who created the sent share invitation
                senderTenantName: string, # Optional. Tenant name of the sender who created the sent share invitation
                sentAt: string (ISO 8601 Format), # Optional. Gets the time at which the invitation was sent.
                sentShareName: string, # Optional. Gets the source share Name.
                shareKind: "InPlace", # Optional. Defines the supported types for share.
                targetActiveDirectoryId: string, # Required. The target azure active directory id the invitation is sent to.
                targetObjectId: string, # Required. The target object id in the azure active directory the invitation is sent to.
              }, # Required. Properties for a received invitation of kind application.
            }
~+ 1 more JSON objects
UserReceivedInvitationSchema for UserReceivedInvitation:
{
              invitationKind: User, # Required. The types of invitations.
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              properties: {
                description: string, # Optional. Description shared when the invitation was created
                expirationDate: string (ISO 8601 Format), # Optional. The expiration date for the received share created by accepting the invitation.
                invitationStatus: "Pending" | "Accepted" | "Rejected", # Optional. Status of the invitation.
                location: string, # Optional. Location of the invitation.
                receiverEmail: string, # Optional. Email of the user/receiver who received the sent share invitation
                receiverName: string, # Optional. Name of the user/receiver who received the sent share invitation
                receiverTenantName: string, # Optional. Tenant name of the user/receiver who received the sent share invitation
                respondedAt: string (ISO 8601 Format), # Optional. The time the recipient responded to the invitation.
                senderEmail: string, # Optional. Email of the sender who created the sent share invitation
                senderName: string, # Optional. Name of the sender who created the sent share invitation
                senderTenantName: string, # Optional. Tenant name of the sender who created the sent share invitation
                sentAt: string (ISO 8601 Format), # Optional. Gets the time at which the invitation was sent.
                sentShareName: string, # Optional. Gets the source share Name.
                shareKind: "InPlace", # Optional. Defines the supported types for share.
                targetEmail: string, # Required. The receiver email for the invitation is being sent.
              }, # Required. Properties for a received invitation of kind user.
            }

Applies to