{"action":"created","comment":{"url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/comments/77897669","id":77897669,"diff_hunk":"@@ -0,0 +1,101 @@\n+# Create Invitation\r\n+\r\n+Use this API to create a new Invitation.\r\n+\r\n+The invitation process uses the following flow:\r\n+\r\n+* An invitation is created\r\n+* An invitation is sent to the invited user (containing an invitation link)\r\n+* 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\r\n+* The user is redirected to a specific page after redemption completes\r\n+\r\n+When creating a new invitation you have a couple of options available:\r\n+1. On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the *inviteRedeemUrl* returned in the creation response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can control the content and language of the email using [*invitedUserMessageInfo*](../resources/invitedusermessageinfo.md).\r\n+2. When the invited user redeems their invitation, a user entity (of userType Guest) is created and can now be used to control access to resources. Additionally, if a group is specified in the *invitedToGroups* property during creation, then on redemption that invited user will also be added as a member of the specified group.\r\n+\r\n+### Prerequisites\r\n+The following **scopes** are required to execute this API:\r\n+*Directory.ReadWrite.All*\r\n+Additionally, if you are inviting a user to a group, you'll need to request \r\n+*Group.ReadWrite.All*\r\n+### HTTP request\r\n+<!-- { \"blockType\": \"ignored\" } -->\r\n+```http\r\n+POST /invitations\r\n+```\r\n+### Request headers\r\n+| Header       | Value |\r\n+|:---------------|:--------|\r\n+| Authorization  | Bearer <token>. Required.  |\r\n+| Content-Type  | application/json  |\r\n+\r\n+### Request body\r\n+In the request body, supply a JSON representation of [invitation](../resources/invitation.md) object.\r\n+\r\n+The following table shows the properties that are required when you create a invitation.\r\n+\r\n+| Parameter | Type | Description|\r\n+|:---------------|:--------|:----------|\r\n+|invitedUserEmailAddress |string | The email address of the user you are inviting.|\r\n+|inviteRedirectUrl |string |The URL user should be redirected to after redemption.|\r\n+\r\n+\r\n+### Response\r\n+If successful, this method returns `201, Created` response code and [invitation](../resources/invitation.md) object in the response body.\r\n+\r\n+### Example\r\n+##### Request\r\n+Here is an example of the request.\r\n+<!-- {\r\n+  \"blockType\": \"request\",\r\n+  \"name\": \"create_user_from_users\"\r\n+}-->\r\n+```http\r\n+POST https://graph.microsoft.com/beta/invitations\r\n+Content-type: application/json\r\n+Content-length: 551\r\n+\r\n+{\r\n+  \"invitedUserEmailAddress\": \"yyy@test.com\",\r\n+  \"inviteRedirectUrl\": \"https://myapp.com\"\r\n+}\r\n+```\r\n+In the request body, supply a JSON representation of [invitation](../resources/invitation.md) object.\r\n+##### Response\r\n+Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.\r\n+<!-- {\r\n+  \"blockType\": \"response\",\r\n+  \"truncated\": true,\r\n+  \"@odata.type\": \"microsoft.graph.invitations\"\r\n+} -->\r\n+```http\r","path":"api-reference/beta/api/invitation_post.md","position":71,"original_position":71,"commit_id":"00c7ac33cfc732dcd4e07fbd4696debc11d4a5dc","original_commit_id":"00c7ac33cfc732dcd4e07fbd4696debc11d4a5dc","user":{"login":"viv-liu","id":4438973,"avatar_url":"https://avatars.githubusercontent.com/u/4438973?v=3","gravatar_id":"","url":"https://api.github.com/users/viv-liu","html_url":"https://github.com/viv-liu","followers_url":"https://api.github.com/users/viv-liu/followers","following_url":"https://api.github.com/users/viv-liu/following{/other_user}","gists_url":"https://api.github.com/users/viv-liu/gists{/gist_id}","starred_url":"https://api.github.com/users/viv-liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viv-liu/subscriptions","organizations_url":"https://api.github.com/users/viv-liu/orgs","repos_url":"https://api.github.com/users/viv-liu/repos","events_url":"https://api.github.com/users/viv-liu/events{/privacy}","received_events_url":"https://api.github.com/users/viv-liu/received_events","type":"User","site_admin":false},"body":"Contradiction. Up above, it says it returns 201 created? ","created_at":"2016-09-07T20:30:45Z","updated_at":"2016-09-07T20:30:45Z","html_url":"https://github.com/OfficeDev/microsoft-graph-docs/pull/431#discussion_r77897669","pull_request_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431","_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/comments/77897669"},"html":{"href":"https://github.com/OfficeDev/microsoft-graph-docs/pull/431#discussion_r77897669"},"pull_request":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431"}}},"pull_request":{"url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431","id":82451994,"html_url":"https://github.com/OfficeDev/microsoft-graph-docs/pull/431","diff_url":"https://github.com/OfficeDev/microsoft-graph-docs/pull/431.diff","patch_url":"https://github.com/OfficeDev/microsoft-graph-docs/pull/431.patch","issue_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues/431","number":431,"state":"open","locked":false,"title":"Invitation API documentation","user":{"login":"girish","id":112493,"avatar_url":"https://avatars.githubusercontent.com/u/112493?v=3","gravatar_id":"","url":"https://api.github.com/users/girish","html_url":"https://github.com/girish","followers_url":"https://api.github.com/users/girish/followers","following_url":"https://api.github.com/users/girish/following{/other_user}","gists_url":"https://api.github.com/users/girish/gists{/gist_id}","starred_url":"https://api.github.com/users/girish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girish/subscriptions","organizations_url":"https://api.github.com/users/girish/orgs","repos_url":"https://api.github.com/users/girish/repos","events_url":"https://api.github.com/users/girish/events{/privacy}","received_events_url":"https://api.github.com/users/girish/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-23T22:24:35Z","updated_at":"2016-09-07T20:30:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29c4dfbe69b89781d763f5597c3e34a8efe85fb9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431/commits","review_comments_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431/comments","review_comment_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues/431/comments","statuses_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/statuses/00c7ac33cfc732dcd4e07fbd4696debc11d4a5dc","head":{"label":"girish:master","ref":"master","sha":"00c7ac33cfc732dcd4e07fbd4696debc11d4a5dc","user":{"login":"girish","id":112493,"avatar_url":"https://avatars.githubusercontent.com/u/112493?v=3","gravatar_id":"","url":"https://api.github.com/users/girish","html_url":"https://github.com/girish","followers_url":"https://api.github.com/users/girish/followers","following_url":"https://api.github.com/users/girish/following{/other_user}","gists_url":"https://api.github.com/users/girish/gists{/gist_id}","starred_url":"https://api.github.com/users/girish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girish/subscriptions","organizations_url":"https://api.github.com/users/girish/orgs","repos_url":"https://api.github.com/users/girish/repos","events_url":"https://api.github.com/users/girish/events{/privacy}","received_events_url":"https://api.github.com/users/girish/received_events","type":"User","site_admin":false},"repo":{"id":64802147,"name":"microsoft-graph-docs","full_name":"girish/microsoft-graph-docs","owner":{"login":"girish","id":112493,"avatar_url":"https://avatars.githubusercontent.com/u/112493?v=3","gravatar_id":"","url":"https://api.github.com/users/girish","html_url":"https://github.com/girish","followers_url":"https://api.github.com/users/girish/followers","following_url":"https://api.github.com/users/girish/following{/other_user}","gists_url":"https://api.github.com/users/girish/gists{/gist_id}","starred_url":"https://api.github.com/users/girish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girish/subscriptions","organizations_url":"https://api.github.com/users/girish/orgs","repos_url":"https://api.github.com/users/girish/repos","events_url":"https://api.github.com/users/girish/events{/privacy}","received_events_url":"https://api.github.com/users/girish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/girish/microsoft-graph-docs","description":"Documentation for the Microsoft Graph REST API","fork":true,"url":"https://api.github.com/repos/girish/microsoft-graph-docs","forks_url":"https://api.github.com/repos/girish/microsoft-graph-docs/forks","keys_url":"https://api.github.com/repos/girish/microsoft-graph-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/girish/microsoft-graph-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/girish/microsoft-graph-docs/teams","hooks_url":"https://api.github.com/repos/girish/microsoft-graph-docs/hooks","issue_events_url":"https://api.github.com/repos/girish/microsoft-graph-docs/issues/events{/number}","events_url":"https://api.github.com/repos/girish/microsoft-graph-docs/events","assignees_url":"https://api.github.com/repos/girish/microsoft-graph-docs/assignees{/user}","branches_url":"https://api.github.com/repos/girish/microsoft-graph-docs/branches{/branch}","tags_url":"https://api.github.com/repos/girish/microsoft-graph-docs/tags","blobs_url":"https://api.github.com/repos/girish/microsoft-graph-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/girish/microsoft-graph-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/girish/microsoft-graph-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/girish/microsoft-graph-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/girish/microsoft-graph-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/girish/microsoft-graph-docs/languages","stargazers_url":"https://api.github.com/repos/girish/microsoft-graph-docs/stargazers","contributors_url":"https://api.github.com/repos/girish/microsoft-graph-docs/contributors","subscribers_url":"https://api.github.com/repos/girish/microsoft-graph-docs/subscribers","subscription_url":"https://api.github.com/repos/girish/microsoft-graph-docs/subscription","commits_url":"https://api.github.com/repos/girish/microsoft-graph-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/girish/microsoft-graph-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/girish/microsoft-graph-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/girish/microsoft-graph-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/girish/microsoft-graph-docs/contents/{+path}","compare_url":"https://api.github.com/repos/girish/microsoft-graph-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/girish/microsoft-graph-docs/merges","archive_url":"https://api.github.com/repos/girish/microsoft-graph-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/girish/microsoft-graph-docs/downloads","issues_url":"https://api.github.com/repos/girish/microsoft-graph-docs/issues{/number}","pulls_url":"https://api.github.com/repos/girish/microsoft-graph-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/girish/microsoft-graph-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/girish/microsoft-graph-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/girish/microsoft-graph-docs/labels{/name}","releases_url":"https://api.github.com/repos/girish/microsoft-graph-docs/releases{/id}","deployments_url":"https://api.github.com/repos/girish/microsoft-graph-docs/deployments","created_at":"2016-08-03T00:37:56Z","updated_at":"2016-08-03T00:37:59Z","pushed_at":"2016-09-07T19:59:58Z","git_url":"git://github.com/girish/microsoft-graph-docs.git","ssh_url":"git@github.com:girish/microsoft-graph-docs.git","clone_url":"https://github.com/girish/microsoft-graph-docs.git","svn_url":"https://github.com/girish/microsoft-graph-docs","homepage":null,"size":2801,"stargazers_count":0,"watchers_count":0,"language":"Batchfile","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OfficeDev:master","ref":"master","sha":"094f13554616b43e06610d4df2f6c0b4ee9778a4","user":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars.githubusercontent.com/u/6789362?v=3","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"repo":{"id":45865171,"name":"microsoft-graph-docs","full_name":"OfficeDev/microsoft-graph-docs","owner":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars.githubusercontent.com/u/6789362?v=3","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OfficeDev/microsoft-graph-docs","description":"Documentation for the Microsoft Graph REST API","fork":false,"url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs","forks_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/forks","keys_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/teams","hooks_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/hooks","issue_events_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues/events{/number}","events_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/events","assignees_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/assignees{/user}","branches_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/branches{/branch}","tags_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/tags","blobs_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/languages","stargazers_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/stargazers","contributors_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/contributors","subscribers_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/subscribers","subscription_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/subscription","commits_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/contents/{+path}","compare_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/merges","archive_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/downloads","issues_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues{/number}","pulls_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/labels{/name}","releases_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/releases{/id}","deployments_url":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/deployments","created_at":"2015-11-09T20:35:39Z","updated_at":"2016-09-07T00:36:23Z","pushed_at":"2016-09-07T20:13:54Z","git_url":"git://github.com/OfficeDev/microsoft-graph-docs.git","ssh_url":"git@github.com:OfficeDev/microsoft-graph-docs.git","clone_url":"https://github.com/OfficeDev/microsoft-graph-docs.git","svn_url":"https://github.com/OfficeDev/microsoft-graph-docs","homepage":null,"size":4355,"stargazers_count":69,"watchers_count":69,"language":"Batchfile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":84,"forks":99,"open_issues":84,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431"},"html":{"href":"https://github.com/OfficeDev/microsoft-graph-docs/pull/431"},"issue":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues/431"},"comments":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/issues/431/comments"},"review_comments":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431/comments"},"review_comment":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/pulls/431/commits"},"statuses":{"href":"https://api.github.com/repos/OfficeDev/microsoft-graph-docs/statuses/00c7ac33cfc732dcd4e07fbd4696debc11d4a5dc"}}}}
{"actor":{"display_login":"viv-liu"}}