邀请资源类型invitation resource type

表示用于将外部用户添加到组织的邀请。Represents an invitation that is used to add external users to an organization.

邀请进程使用以下流程:The invitation process uses the following flow:

  • 创建邀请An invitation is created
  • 将邀请发送至邀请的用户(包含邀请链接)An invitation is sent to the invited user (containing an invitation link)
  • 邀请的用户单击邀请链接、登录并兑现邀请和创建用户实体表示邀请的用户完成操作The invited user clicks on the invitation link, signs in and redeems the invitation and creation of the user entity representing the invited user completes
  • 兑现完成后,将用户重定向至指定页面The user is redirected to a specific page after redemption completes

创建邀请会在响应中返回兑现 URL (inviteRedeemUrl)。通过将 sendInvitationMessage 设置为 true,创建邀请 API 可以自动向邀请的用户发送包含兑现 URL 的电子邮件。还可以自定义要发送至邀请的用户的邮件。反之,如果想要通过一些其他的方法发送兑现 URL,则可以将 sendInvitationMessage 设置为 false,然后使用响应中的兑现 URL 创建自己的通信。目前没有可以执行兑现进程的 API。邀请的用户必须单击在上述步骤中的通信中发送的 inviteRedeemUrl 链接,并在浏览器中进行交互式兑现流程。完成后,邀请的用户即成为组织中的外部用户。Creating an invitation will return a redemption URL in the response (inviteRedeemUrl). The create invitation API can automatically send an email containing the redemption URL to the invited user, by setting the sendInvitationMessage to true. You can also customize the message that will be sent to the invited user. Instead, if you wish to send the redemption URL through some other means, you can set the sendInvitationMessage to false and use the redeem URL from the response to craft your own communication. Currently, there is no API to perform the redemption process. The invited user has to click on the inviteRedeemUrl link sent in the communication in the step above, and go through the interactive redemption process in a browser. Once completed, the invited user becomes an external user in the organization.

方法Methods

方法Method 返回类型Return Type 说明Description
创建邀请Create invitation 邀请invitation 写入 invitation 对象的属性和关系。Write properties and relationships of invitation object.

属性Properties

属性Property 类型Type 说明Description
invitedUserDisplayNameinvitedUserDisplayName StringString 被邀请的用户的显示名称。The display name of the user being invited.
invitedUserEmailAddressinvitedUserEmailAddress StringString 被邀请的用户的电子邮件地址。The email address of the user being invited. 必需。Required. 电子邮件地址中不允许使用以下特殊字符:The following special characters are not permitted in the email address:
  • 波形符 (~)Tilde (~)
  • 感叹号 (!)Exclamation point (!)
  • @ 符号 (@)At sign (@)
  • 井号 (#)Number sign (#)
  • 美元符号 ($)Dollar sign ($)
  • 百分号 (%)Percent (%)
  • 扬抑符 (^)Circumflex (^)
  • 与号 (&)Ampersand (&)
  • 星号 (*)Asterisk (*)
  • 圆括号 (( ))Parentheses (( ))
  • 连字符 (-)hyphen (-)
  • 加号 (+)Plus sign (+)
  • 等号 (=)Equal sign (=)
  • 方括号 ([ ])Brackets ([ ])
  • 大括号 ({ })Braces ({ })
  • 反斜杠 (\)Backslash (\)
  • 斜杠符号 (/)Slash mark (/)
  • 竖线 (|)Pipe (|)
  • 分号 (;)Semicolon (;)
  • 冒号 (:)Colon (:)
  • 引号 (")Quotation marks (")
  • 尖括号 (< >)Angle brackets (< >)
  • 问号 (?)Question mark (?)
  • 逗号 (,)Comma (,)

但是,存在下列例外情况:However, the following exceptions apply:
  • 允许在用户名中的任何位置使用句点 (.) 或连字符 (-),但名称的开头或结尾除外。A period (.) or a hyphen (-) is permitted anywhere in the user name, except at the beginning or end of the name.
  • 允许在用户名中的任何位置使用下划线 (_)。An underscore (_) is permitted anywhere in the user name. 这包括名称的开头或结尾。This includes at the beginning or end of the name.
invitedUserMessageInfoinvitedUserMessageInfo invitedUserMessageInfoinvitedUserMessageInfo 要发送至邀请用户的邮件的其他配置,其中包括自定义邮件文本、语言和抄送收件人列表。Additional configuration for the message being sent to the invited user, including customizing message text, language and cc recipient list.
sendInvitationMessagesendInvitationMessage BooleanBoolean 指示电子邮件是否应发送至邀请的用户。默认值为 false。Indicates whether an email should be sent to the user being invited or not. The default is false.
inviteRedirectUrlinviteRedirectUrl StringString 兑现邀请后,用户应被重定向至的 URL。必填。The URL user should be redirected to once the invitation is redeemed. Required.
inviteRedeemUrlinviteRedeemUrl StringString 用户可用于兑现邀请的 URL。只读The URL user can use to redeem his invitation. Read-Only
invitedUserTypeinvitedUserType StringString 被邀请的用户的 userType。The userType of the user being invited. 默认情况下,此值为“来宾”。By default, this is Guest. 如果你是公司管理员,则可以以“成员”身份进行邀请。You can invite as Member if you are a company administrator.
状态status 字符串String 邀请的状态。可能的值:PendingAcceptance、Completed、InProgress 和 ErrorThe status of the invitation. Possible values: PendingAcceptance, Completed, InProgress, and Error

关系Relationships

关系Relationship 类型Type 说明Description
invitedUserinvitedUser 用户User 创建为邀请创建进程组成部分的用户。只读The user created as part of the invitation creation. Read-Only

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

{
  "invitedUserDisplayName": "string",
  "invitedUserEmailAddress": "string",
  "invitedUserMessageInfo": {"@odata.type": "microsoft.graph.invitedUserMessageInfo"},
  "sendInvitationMessage": false,
  "inviteRedirectUrl": "string",
  "inviteRedeemUrl": "string",
  "status": "string",
  "invitedUser": {"@odata.type": "microsoft.graph.user"},
  "invitedUserType": "string"
}