Updates from: 02/10/2021 04:19:36
Service Microsoft Docs article Related commit history on GitHub Change details
v1.0 https://docs.microsoft.com/en-us/graph/api/accesspackage-delete https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/accesspackage-delete.md
@@ -31,7 +31,6 @@ One of the following permissions is required to call this API. To learn more, in
```http DELETE /identityGovernance/entitlementManagement/accessPackages/{id}- ``` ## Request headers
v1.0 https://docs.microsoft.com/en-us/graph/api/accesspackageresourceenvironment-get https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/accesspackageresourceenvironment-get.md
@@ -51,6 +51,8 @@ If successful, this method returns a `200 OK` response code and an [accessPackag
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "get_accesspackageresourceenvironment"
@@ -59,6 +61,24 @@ If successful, this method returns a `200 OK` response code and an [accessPackag
``` http GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageResourceEnvironments/{accessPackageResourceEnvironmentId} ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/accesspackageresourceenvironment-list https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/accesspackageresourceenvironment-list.md
@@ -49,6 +49,8 @@ If successful, this method returns a `200 OK` response code and a collection of
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "list_accesspackageresourceenvironment"
@@ -57,6 +59,24 @@ If successful, this method returns a `200 OK` response code and a collection of
``` http GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageResourceEnvironments?$filter=originSystem eq 'SharePointOnline' ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/accesspackageresourcerequest-post https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/accesspackageresourcerequest-post.md
@@ -142,6 +142,8 @@ Content-type: application/json
The following is an example of the request. In this example, the `@odata.bind` annotation is used to assign the `id` of the `accessPackageResourceEnvironment` to an `accessPackageResourceEnvironment` object. +
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "create_accesspackageresourcerequest_from_accesspackageresourcerequests_with_accessPackageResourceEnvironment"
@@ -164,6 +166,24 @@ Content-type: application/json
"requestType": "AdminAdd" } ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ #### Response
@@ -200,6 +220,8 @@ Content-type: application/json
The following is an example of the request. In this example, the parameters of an `accessPackageResourceEnvironment` are specified in an `accessPackageResourceEnvironment` object. +
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "create_accesspackageresourcerequest_from_accesspackageresourcerequests_with_accessPackageResourceEnvironment_New"
@@ -224,6 +246,24 @@ Content-type: application/json
"requestType": "AdminAdd" } ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ #### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/application-post-calls https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/application-post-calls.md
@@ -1143,7 +1143,6 @@ With tenant admin credentials, call the following cmdlets on the tenant remote P
PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber> PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId> ```
-> **Note:** If a tenant has Australian PSTN numbers assigned to any application instances, this call might fail. If a tenant is newly created, it might take several days for this feature to be available.
#### Request The following example shows the request to make a peer-to-peer call between the bot and a PSTN number. In this example, the media is hosted by the service. The values of authorization token, callback URL, application ID, application name, user ID, user name, and tenant ID must be replaced with actual values to make the example work.
@@ -1290,8 +1289,6 @@ Content-Type: application/json
This call needs application instance with PSTN number assigned, as described in Example 9.
-> **Note:** If a tenant has Australian PSTN numbers assigned to any application instances, this call might not work. If a tenant is newly created, it might take several days for this feature to be available.
- #### Request The following example shows a request to make a peer-to-peer call between the bot and a PSTN number. In this example, the media is hosted locally by the application. Replace the values for authorization token, callback URL, application ID, application name, user ID, user name, and tenant ID to make the example work.
v1.0 https://docs.microsoft.com/en-us/graph/api/call-redirect https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/call-redirect.md
@@ -434,7 +434,6 @@ With tenant admin credentials, call the following cmdlets on the tenant remote P
PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber> PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId> ```
-> **Note:** If a tenant has Australian PSTN numbers assigned to any application instances, this call might fail. If a tenant is newly created, it might take several days for this feature to be available.
#### Notification - incoming <!-- {
v1.0 https://docs.microsoft.com/en-us/graph/api/call-transfer https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/call-transfer.md
@@ -440,7 +440,6 @@ With tenant admin credentials, call the following cmdlets on the tenant remote P
PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber> PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId> ```
-> **Note:** If a tenant has Australian PSTN numbers assigned to any application instances, this call might fail. If a tenant is newly created, it might take several days for this feature to be available.
#### Request The following example shows the request.
@@ -614,9 +613,6 @@ Content-Type: application/json
This call requires an application instance with PSTN number assigned, as described in Example 3.
-> **Note:** This call may fail if a tenant has Australian PSTN numbers assigned to any application instances. If a tenant is newly created, it might take several days for this feature to be available.
-- #### Request The following example shows the request.
v1.0 https://docs.microsoft.com/en-us/graph/api/custodian-list-usersources https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/custodian-list-usersources.md
@@ -58,6 +58,8 @@ If successful, this method returns a `200 OK` response code and a collection of
### Request +
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "get_usersource"
@@ -67,6 +69,24 @@ If successful, this method returns a `200 OK` response code and a collection of
``` http GET https://graph.microsoft.com/beta/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/directory-deleteditems-restore https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/directory-deleteditems-restore.md
@@ -3,7 +3,7 @@ Title: "Restore deleted item"
description: "Restores a recently deleted item from deleted items. " localization_priority: Normal doc_type: apiPageType
@@ -15,7 +15,7 @@ Namespace: microsoft.graph
Restores a recently deleted item from [deleted items](../resources/directory.md).
-Currently, deleted items functionality is only supported for the [application](../resources/application.md), [group](../resources/group.md) and [user](../resources/user.md) resources. If an item was accidentally deleted, you can fully restore the item.
+Currently, restore deleted items functionality is only supported for the [application](../resources/application.md), [group](../resources/group.md), and [user](../resources/user.md) resources. If an item was accidentally deleted, you can fully restore the item. This is not applicable to Security groups which are deleted permanently.
A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted.
v1.0 https://docs.microsoft.com/en-us/graph/api/directoryobject-checkmembergroups https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/directoryobject-checkmembergroups.md
@@ -22,9 +22,9 @@ One of the following permissions is required to call this API. To learn more, in
|Permission type | Permissions (from least to most privileged) | |:--|:|
-|Delegated (work or school account) | User.ReadBasic.All and GroupMember.Read.All, User.Read.All and GroupMember.Read.All, User.ReadBasic.All and Group.Read.All, User.Read.All and Group.Read.All, Directory.Read.All |
+|Delegated (work or school account) | User.ReadBasic.All, User.Read.All, Directory.Read.All |
|Delegated (personal Microsoft account) | Not supported. |
-|Application | User.Read.All and GroupMember.Read.All, User.Read.All and Group.Read.All, Directory.Read.All |
+|Application | User.Read.All, Directory.Read.All |
Use the follow scenario guidance to help determine which permission types to use: - Use User.Read and GroupMember.Read.All or User.Read and Group.Read.All permissions to get group memberships for the signed-in user.
v1.0 https://docs.microsoft.com/en-us/graph/api/identityuserflow-post-userflows https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/identityuserflow-post-userflows.md
@@ -65,6 +65,7 @@ POST https://graph.microsoft.com/beta/identity/userFlows
Content-type: application/json {
+ "id": "Pol1",
"userFlowType": "signUpOrSignIn", "userFlowTypeVersion": 1 }
v1.0 https://docs.microsoft.com/en-us/graph/api/participant-invite https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/participant-invite.md
@@ -723,7 +723,6 @@ With tenant admin credentials, call the following cmdlets on the tenant remote P
PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber> PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId> ```
-> **Note:** If a tenant has Australian PSTN numbers assigned to any application instances, this call might fail. If a tenant is newly created, it might take several days for this feature to be available.
#### Request
v1.0 https://docs.microsoft.com/en-us/graph/api/signin-list https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/signin-list.md
@@ -96,7 +96,7 @@ Do not supply a request body for this method.
## Response
-If successful, this method returns a `200 OK` response code and collection of [signIn](../resources/signin.md) objects in the response body.
+If successful, this method returns a `200 OK` response code and collection of [signIn](../resources/signin.md) objects in the response body. The collection of objects is listed in descending order based on **createdDateTime**.
## Examples
v1.0 https://docs.microsoft.com/en-us/graph/api/site-delete-permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/site-delete-permission.md
@@ -46,6 +46,8 @@ If successful, this method returns `204 No Content` response code. It does not r
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "delete_permission"
@@ -54,6 +56,24 @@ If successful, this method returns `204 No Content` response code. It does not r
``` http DELETE https://graph.microsoft.com/beta/sites/{sitesId}/permissions/{permissionId} ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/site-get-permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/site-get-permission.md
@@ -49,6 +49,8 @@ If successful, this method returns a `200 OK` response code and the [permission]
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "get_permission"
@@ -57,6 +59,24 @@ If successful, this method returns a `200 OK` response code and the [permission]
``` http GET https://graph.microsoft.com/beta/sites/{sitesId}/permissions/{permissionId} ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
@@ -86,4 +106,4 @@ Content-Type: application/json
"type": "#page.annotation", "section": "documentation", "tocPath": "Sites/Permissions/Get site permission"
-} -->
+} -->
v1.0 https://docs.microsoft.com/en-us/graph/api/site-list-permissions https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/site-list-permissions.md
@@ -49,6 +49,8 @@ If successful, this method returns a `200 OK` response code and a collection of
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "list_permission"
@@ -57,6 +59,24 @@ If successful, this method returns a `200 OK` response code and a collection of
``` http GET https://graph.microsoft.com/beta/sites/{sitesId}/permissions ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
@@ -101,4 +121,4 @@ Content-Type: application/json
"type": "#page.annotation", "section": "documentation", "tocPath": "Sites/Permissions/List site permissions"
-} -->
+} -->
v1.0 https://docs.microsoft.com/en-us/graph/api/site-post-permissions https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/site-post-permissions.md
@@ -47,6 +47,8 @@ If successful, this method returns a `201 Created` response code and a [permissi
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "create_permission_from_"
@@ -66,6 +68,24 @@ Content-Type: application/json
}] } ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/site-update-permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/site-update-permission.md
@@ -47,6 +47,8 @@ If successful, this method returns a `200 OK` response code and a [permission](.
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "update_permission_from_"
@@ -60,6 +62,24 @@ Content-Type: application/json
"roles": ["read"] } ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/tiindicator-update https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/tiindicator-update.md
@@ -51,52 +51,19 @@ In the request body, supply the values for relevant fields that should be update
|additionalInformation|String|A catchall area into which extra data from the indicator not covered by the other tiIndicator properties may be placed. Data placed into additionalInformation will typically not be utilized by the targetProduct security tool.| |confidence|Int32|An integer representing the confidence the data within the indicator accurately identifies malicious behavior. Acceptable values are 0 ΓÇô 100 with 100 being the highest.| |description|String|Brief description (100 characters or less) of the threat represented by the indicator.|
-|diamondModel|[diamondModel](#diamondmodel-values)|The area of the Diamond Model in which this indicator exists. Possible values are: `unknown`, `adversary`, `capability`, `infrastructure`, `victim`.|
+|diamondModel|[diamondModel](../resources/tiindicator.md#diamondmodel-values)|The area of the Diamond Model in which this indicator exists. Possible values are: `unknown`, `adversary`, `capability`, `infrastructure`, `victim`.|
|expirationDateTime|DateTimeOffset| DateTime string indicating when the Indicator expires. All indicators must have an expiration date to avoid stale indicators persisting in the system. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: `2014-01-01T00:00:00Z`.| |externalId|String|An identification number that ties the indicator back to the indicator providerΓÇÖs system (e.g. a foreign key).| |isActive|Boolean|Used to deactivate indicators within system. By default, any indicator submitted is set as active. However, providers may submit existing indicators with this set to ΓÇÿFalseΓÇÖ to deactivate indicators in the system.|
-|killChain|[killChain](#killchain-values) collection|A JSON array of strings that describes which point or points on the Kill Chain this indicator targets. See "killChain values" below for exact values.|
+|killChain|[killChain](../resources/tiindicator.md#killchain-values) collection|A JSON array of strings that describes which point or points on the Kill Chain this indicator targets. See "killChain values" below for exact values.|
|knownFalsePositives|String|Scenarios in which the indicator may cause false positives. This should be human-readable text.| |lastReportedDateTime|DateTimeOffset|The last time the indicator was seen. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: `2014-01-01T00:00:00Z`| |malwareFamilyNames|String collection|The malware family name associated with an indicator if it exists. Microsoft prefers the Microsoft malware family name if at all possible which can be found via the Windows Defender Security Intelligence [threat encyclopedia](https://www.microsoft.com/wdsi/threats).| |passiveOnly|Boolean|Determines if the indicator should trigger an event that is visible to an end-user. When set to ΓÇÿtrue,ΓÇÖ security tools will not notify the end user that a ΓÇÿhitΓÇÖ has occurred. This is most often treated as audit or silent mode by security products where they will simply log that a match occurred but will not perform the action. Default value is false.| |severity|Int32|An integer representing the severity of the malicious behavior identified by the data within the indicator. Acceptable values are 0 ΓÇô 5 where 5 is the most severe and zero is not severe at all. Default value is 3.| |tags|String collection|A JSON array of strings that stores arbitrary tags/keywords.|
-|tlpLevel|[tlpLevel](#tlplevel-values)| Traffic Light Protocol value for the indicator. Possible values are: `unknown`, `white`, `green`, `amber`, `red`.|
+|tlpLevel|[tlpLevel](../resources/tiindicator.md#tlplevel-values)| Traffic Light Protocol value for the indicator. Possible values are: `unknown`, `white`, `green`, `amber`, `red`.|
-### diamondModel values
-
-For information about this model, see [The diamond model](http://diamondmodel.org).
-
-| Values | Description |
-|:-|:|
-|adversary|The indicator describes the adversary.|
-|capability|The indicator is a capability of the adversary.|
-|infrastructure|The indicator describes infrastructure of the adversary.|
-|victim|The indicator describes the victim of the adversary.|
-
-### killChain values
-
-| Values | Description |
-|:-|:|
-|Actions|Represents ΓÇ£Actions on ObjectivesΓÇ¥. The attacker is leveraging the compromised system to take actions such as a distributed denial of service attack.|
-|C2|Represents the control channel by which a compromised system is manipulated.|
-|Delivery|The process of distributing the exploit code to victims (for example USB, email, websites).|
-|Exploitation|The exploit code taking advantage of vulnerabilities (for example, code execution).|
-|Installation|Installing malware after a vulnerability has been exploited.|
-|Reconnaissance|Indicator is evidence of an activity group harvesting information to be used in a future attack.|
-|Weaponization|Turning a vulnerability into exploit code (for example, malware).|
-
-### tlpLevel values
-
-Every indicator must have a Traffic Light Protocol (tlp) value when it is submitted. This value represents the sensitivity and sharing scope of a given indicator.
-
-| Values | Description |
-|:-|:|
-|White| Sharing scope: Unlimited. Indicators can be shared freely, without restriction.|
-|Green| Sharing scope: Community. Indicators can be shared with the security community.|
-|Amber| Sharing scope: Limited. This is the default setting for indicators and restricts sharing to only those with a need-to-know: 1) Services and service operators that implement threat intelligence; 2) Customers whose system(s) exhibit behavior consistent with the indicator.|
-|Red| Sharing scope: Personal. These indicators are to only be shared directly and, preferably, in person. Typically, TLP Red indicators are not ingested due to their pre-defined restrictions. If TLP Red indicators are submitted, the **passiveOnly** property should be set to `True` as well. |
## Response
v1.0 https://docs.microsoft.com/en-us/graph/api/user-getmembergroups https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/user-getmembergroups.md
@@ -26,9 +26,9 @@ One of the following permissions is required to call this API. To learn more, in
| Permission type | Permissions (from least to most privileged) | | :- | : |
-| Delegated (work or school account) | User.ReadBasic.All and GroupMember.Read.All, User.Read and GroupMember.Read.All, User.Read.All and GroupMember.Read.All, User.ReadBasic.All and Group.Read.All, User.Read and Group.Read.All, User.Read.All and Group.Read.All, Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All |
+| Delegated (work or school account) | User.ReadBasic.All, User.Read, User.Read.All, Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All |
| Delegated (personal Microsoft account) | Not supported. |
-| Application | User.Read.All and GroupMember.Read.All, User.Read.All and Group.Read.All, Directory.Read.All, Directory.ReadWrite.All |
+| Application | User.Read.All, Directory.Read.All, Directory.ReadWrite.All |
## HTTP request
v1.0 https://docs.microsoft.com/en-us/graph/api/user-list-messages https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/user-list-messages.md
@@ -15,7 +15,11 @@ Namespace: microsoft.graph
Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders).
-Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request.
+Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000.
+
+To improve the operation response time, use `$select` to specify the exact properties you need; see [example 1](#example-1-list-all-messages) below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the [gateway timeout](/graph/errors#http-status-codes) (HTTP 504).
+
+To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request.
Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see [Paging Microsoft Graph data in your app](/graph/paging).
@@ -95,8 +99,9 @@ Do not supply a request body for this method.
If successful, this method returns a `200 OK` response code and collection of [message](../resources/message.md) objects in the response body.
-## Example
-##### Request 1
+## Examples
+### Example 1: List all messages
+#### Request
The first example gets the default, top 10 messages in the signed-in user's mailbox. It uses `$select` to return a subset of the properties of each message in the response. # [HTTP](#tab/http)
@@ -125,7 +130,7 @@ GET https://graph.microsoft.com/beta/me/messages?$select=sender,subject
-##### Response 1
+#### Response
Here is an example of the response. To get the next page of messages, apply the URL returned in `@odata.nextLink` to a subsequent GET request. <!-- {
@@ -235,10 +240,9 @@ Content-type: application/json
} ``` -
-##### Request 2
-The next example filters all messages in the signed-in user's mailbox for those that mention the user. It also uses `$select`
-to return a subset of the properties of each message in the response.
+### Example 2: Use $filter to get all messages satisfying a specific condition
+#### Request
+The next example filters all messages in the signed-in user's mailbox for those that mention the user. It also uses `$select` to return a subset of the properties of each message in the response.
The example also incorporates URL encoding for the space characters in the query parameter string.
@@ -268,7 +272,7 @@ GET https://graph.microsoft.com/beta/me/messages?$filter=MentionsPreview/IsMenti
-##### Response 2
+#### Response
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. <!-- { "blockType": "response",
@@ -320,7 +324,8 @@ Content-length: 987
} ```
-##### Request 3
+### Example 3: Use prefer header to get the message body and uniqueBody is text format
+#### Request
The third example shows how to use a `Prefer: outlook.body-content-type="text"` header to get the **body** and **uniqueBody** properties of each message in text format. # [HTTP](#tab/http)
@@ -350,7 +355,7 @@ Prefer: outlook.body-content-type="text"
-##### Response 3
+#### Response
Here is an example of the response. <!--
v1.0 https://docs.microsoft.com/en-us/graph/api/user-translateexchangeids https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/user-translateexchangeids.md
@@ -50,7 +50,7 @@ POST /users/{id|userPrincipalName}/translateExchangeIds
### exchangeIdFormat values
-| Values | Description |
+| Member | Description |
|:-|:| | entryId | The binary entry ID format used by MAPI clients. | | ewsId | The ID format used by Exchange Web Services clients. |
v1.0 https://docs.microsoft.com/en-us/graph/api/usersource-get https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/api/usersource-get.md
@@ -58,6 +58,8 @@ If successful, this method returns a `200 OK` response code and a [userSource](.
### Request +
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "get_usersource"
@@ -67,6 +69,24 @@ If successful, this method returns a `200 OK` response code and a [userSource](.
``` http GET https://graph.microsoft.com/beta/compliance/ediscovery/cases4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources/46384443-4137-3032-3437-363939433735 ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/cloudpconpremisesconnection-runhealthcheck-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/cloudpconpremisesconnection-runhealthcheck-csharp-snippets.md
@@ -6,8 +6,8 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.DeviceManagement.VirtualEndpoint.CloudPCs["{id}"]
- .Reprovision()
+await graphClient.DeviceManagement.VirtualEndpoint.OnPremisesConnections["{id}"]
+ .RunHealthChecks()
.Request() .PostAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-csharp-snippets.md
@@ -0,0 +1,31 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var accessPackageResourceRequest = new AccessPackageResourceRequestObject
+{
+ CatalogId = "de9315c1-272b-4905-924b-cc112ca180c7",
+ AccessPackageResource = new AccessPackageResource
+ {
+ DisplayName = "Community Outreach",
+ Description = "https://contoso.sharepoint.com/sites/CSR",
+ ResourceType = "SharePoint Online Site",
+ OriginId = "https://contoso.sharepoint.com/sites/CSR",
+ OriginSystem = "SharePointOnline",
+ AdditionalData = new Dictionary<string, object>()
+ {
+ {"accessPackageResourceEnvironment@odata.bind", "accessPackageResourceEnvironments/615f2218-678f-471f-a60a-02c2f4f80c57"}
+ }
+ },
+ RequestType = "AdminAdd"
+};
+
+await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageResourceRequests
+ .Request()
+ .AddAsync(accessPackageResourceRequest);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-csharp-snippets.md
@@ -0,0 +1,31 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var accessPackageResourceRequest = new AccessPackageResourceRequestObject
+{
+ CatalogId = "de9315c1-272b-4905-924b-cc112ca180c7",
+ AccessPackageResource = new AccessPackageResource
+ {
+ DisplayName = "Community Outreach",
+ Description = "https://contoso.sharepoint.com/sites/CSR",
+ ResourceType = "SharePoint Online Site",
+ OriginId = "https://contoso.sharepoint.com/sites/CSR",
+ OriginSystem = "SharePointOnline",
+ AccessPackageResourceEnvironment = new AccessPackageResourceEnvironment
+ {
+ OriginId = "https://contoso-admin.sharepoint.com/"
+ }
+ },
+ RequestType = "AdminAdd"
+};
+
+await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageResourceRequests
+ .Request()
+ .AddAsync(accessPackageResourceRequest);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-chatmessage-from-channel-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-chatmessage-from-channel-csharp-snippets.md
@@ -8,44 +8,9 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var chatMessage = new ChatMessage {
- Subject = null,
Body = new ItemBody {
- ContentType = BodyType.Html,
- Content = "<attachment id=\"74d20c7f34aa4a7fb74e2b30004247c5\"></attachment>"
- },
- Attachments = new List<ChatMessageAttachment>()
- {
- new ChatMessageAttachment
- {
- Id = "74d20c7f34aa4a7fb74e2b30004247c5",
- ContentType = "application/vnd.microsoft.card.adaptive",
- ContentUrl = null,
- Content = "{\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"type\": \"AdaptiveCard\",\r\n \"version\": \"1.2\",\r\n \"speak\": \"The Seattle Seahawks beat the Carolina Panthers 40-7\",\r\n \"body\": [\r\n {\r\n \"type\": \"Container\",\r\n \"items\": [\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"../hostedContents/1/$value\",\r\n \"size\": \"Medium\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"SHADES\",\r\n \"horizontalAlignment\": \"Center\",\r\n \"weight\": \"Bolder\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"stretch\",\r\n \"separator\": true,\r\n \"spacing\": \"Medium\",\r\n \"items\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"2019-08-31T19:30:00Z\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"Final\",\r\n \"spacing\": \"None\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"40 - 7\",\r\n \"size\": \"ExtraLarge\",\r\n \"horizontalAlignment\": \"Center\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"separator\": true,\r\n \"spacing\": \"Medium\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"../hostedContents/2/$value\",\r\n \"size\": \"Medium\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"SKINS\",\r\n \"horizontalAlignment\": \"Center\",\r\n \"weight\": \"Bolder\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}",
- Name = null,
- ThumbnailUrl = null
- }
- },
- HostedContents = new ChatMessageHostedContentsCollectionPage()
- {
- new ChatMessageHostedContent
- {
- ContentBytes = Encoding.ASCII.GetBytes("iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaK6UvXb169ToGNuA0Cp+oYVHlxsYGK2QVEFqnT5/eej8/+9nPtr73LwjvFZPxeK84GsMpJHueEniGFJ7785///Ox73/vell/84hcUaoSff/WrX92aOMeCz64UVo389eTJk//1ne98Z/OnP/3p22+99dZ7NlZpaORGw6Ure0Kk72GD73/vfFU0BjQ6KT5lI8UsRjiS6vNFpFibhecoKaBTh9QXv/jF2Y9+9KPZr371K1qDJkqs09jhL14cPLzxxhtudzhogoZNW/ZEe4zLYSECC4ViRRwCghODxWOFOsIO4YzOwV47lxQhdf/9928dCfUJ8GXwnDgiHbpOU4Ijfzu6+pDtD280dJqyJ0A4ud3sahE65pBhhXDKdUEyAnDIQdgnpBBOL774In1fqQ1dp6lBnXONgUU0fNaxB2KuCad09Ek94bA/53wOdgwGAtsWbxiEQwRz15DCkZPHEeY6eE0cgbL3IumhT7L94IWG0Cr2oGNm0HNUwCmX99+gmP/wOF1pC6e8Oefn2obUww8/3Gu+KRX8BVb6POZY4C8Ftg880CBi7JezrzRdx7NT5twJTeBoARP1bFtTaxNSJ0+epNs7lKGOPqco5aVjq9BAitkvIqCyrzRtAp0y9Sc+Q5x3N5VjADYNqVxzT13gFJ29N0kHZzI5Tu9pKC2yX8JSeJfveE8pxeBF0XP97dAHQpRtfypNQqrkgAq86yR55qdoMAX2C5ggH3z+qam+p0OY+2HPWyLPAbgupGoIqEBB5c/7aIqGE9gPiz3FW6bPqV/Jp3jLeJ36rQqpmgIq0KmfL3yIxeqeyCkaUGA/zLL+KTUEVdtP/YZaYpCCx3KMZSFV2iR5G7k+dJgi9EFW8wRwkLRrWUANdsVzCjhtY8VkHAucRZdQXoeFFJYZsNevBeqk5Ql+WM17wjTT1l1EWUBluW+xtyaL+zC4S1gH1VebUG6ChVQJ66D6Sl0nucVhHG3fnYGFVFXzUMs0+ZvT+Vw6q5SnM3FIYSU5e80aaWW6j8QfOp1azKQ4oHAHA/agKq36ZAcBxh5TK/xNlvK0LwQUrsVD4LPXrJHH6bEkDakdN+NbDCh8mlfNcoOmlk0s1/hp3jqpPsX68pe/vB1SNX6at44+7UsvUUjRu4Vu/4f9wqiOogIszowLOrajqABHCfF77eIHP/jB9lEUe53a6WgqPVbnlpbeznj7P+yXil9V3lU8NzXGo6ig79qpb3zjG9shdfbsWfoaY6C5qXSwNpHVuIWV91vf+of9Eu4LxR48CouH9/gbdExzLDFcdL3Ygdp64YUXtkNqzHXCHB57/9Jez4vxb5skZ7b+Yb9Y1N0NUlvskDmuNRpan/VAf/rTn7ZCCrf8Zc89JroVcRr4i5HVdw3Mf9MvgYht/WP+APZEoxE6ZA0XEPfV9VQGyxjwByE1xgnzmCbQ++u4GBrLnBp/3TsCahSLN9cJA3fMpzAB+7Cgibffftv6xEchNYZFruv0PTWWTp/q4VujWn2DMkIKd9pkTzYqGLgJJviq0OVTPsxFhT8XLlygzztGrBbSTMu5KBw97bHuRYNoldHPRwU4MpjCfFTQZr4Fn+gt/nn11Vfpc46RxwXaU4D+1fCsBFNJx6xb0QBqAiFV5d0Ouqj5bgdtNb1MBgH14YcfWl+49ec3v/kNfc4x0lKE9hoGFMIJNypodWrHIKTYC4xSx08hqtRkUhhBFgcU/rzxxhv0OcdIk+ft4Mjzj3/84/+xWs5hvSUWhvcOp0AhNVKrBt9TTz01e+WVV2z/8z/vvPMOfc4x0p07m8H6whVnIjhqwrRR40/s2lBIjRTu8BB3NIQTJsjff/992/fL/0wppHT7ltUQTpjL/cMf/vC3qHaYCMcndZ0mw9uYVEhdvXqVto8RAhmnc4Cjpt/97ne2v5v9UUhNExYB43QOfvzjH7//+uuvv2undn+x/vCa1QqBhJUA7qF0u9nH/h+sBaOnOz4IxQAAAABJRU5ErkJggg=="),
- ContentType = "image/png",
- AdditionalData = new Dictionary<string, object>()
- {
- {"@microsoft.graph.temporaryId", "1"}
- }
- },
- new ChatMessageHostedContent
- {
- ContentBytes = Encoding.ASCII.GetBytes("iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEar6WzSnk5E4cUVpKz16yRVqb7SPym08nFTIoDCncwYA+q0qp3dhBg7DG1wt9kKS/7QkDhs3gIfPaaNfK4PJakIbXrZnyLAYV386pZbtDUsonlGt/NWyfVu1hPPfXUTkjV+G7eOnq3L71EIUXvFrrzH/YLozqLCrA4My7o2M6iApwlxPvaxSuvvLJzFsVep3Y6m0qP1bmlpbcz3vkP+6XiV5V3Fc9NjfEsKui7duq5557bCakzZ87Q1xgDzU2lg7WJrMYtrLzf+vY/7JdwXyj24FFYPL3H36BjmmOJ4UPXix2orbfeemsnpMZcJ8zhsf2X9np+GP9Hk+TM9j/sF4u6u0Fqix0yx2eNhtZnPdBXX321HVK45S977jHRrYjTwF+MrL5rYP6bfglEbPsf8wewJxqN0CFr+ABxX10vZbCMAX8QUmOcMI9pAr2/jouhscyp8de9I6BGsXhznTBwx3wJE7A3C5r4/PPPrU/8EFJjWOS6Tt9LY+n0rh6+NarVNygjpHCnTfZko4KBm2CCrwpd3uXDXFT4c+7cOfq8Y8RqIc20nIvC2dN+6140iFYZ/XxUgDODKcxHBW3mW/CO3uKf9957jz7nGHl8QHsK0L8aXpVgKmnTuhUNoCYQUlXe7aCLmu920FbTj8kgoL7//nvrC9f//OlPf6LPOUZaitBew4BCOOFGBa0u7RiEFHuBUer4LkSVmkwKI8jigMKfTz75hD7nGGnyvB2cef71r3/9P1bLOay3xMLw3uEUKKRGatXge/LJJ2fvvvuuHX/+54svvqDPOUa6c2czWF+44koEZ02YNmr8jl0bCqmRwh0e4o6GcMIE+bfffmvHfvmfKYWUbt+yGsIJc7mfffbZf0e1w0Q43qnrNBnexqRC6uOPP6btY4RAxuUc4Kzpo48+suPd7I9CapqwCBiXc/DGG298+8EHH/yXXdr9zfrDv1utEEhYCeAeSj82+8n/A1GsifSVBvjAAAAAAElFTkSuQmCC"),
- ContentType = "image/png",
- AdditionalData = new Dictionary<string, object>()
- {
- {"@microsoft.graph.temporaryId", "2"}
- }
- }
+ Content = "Hello World"
} };
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-directoryobject-from-device-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-directoryobject-from-device-csharp-snippets.md
@@ -11,7 +11,7 @@ var directoryObject = new DirectoryObject
Id = "{id}" };
-await graphClient.Devices["{id}"].RegisteredOwners.References
+await graphClient.Devices["{id}"].RegisteredUsers.References
.Request() .AddAsync(directoryObject);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-educationclass-from-educationschool-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-educationclass-from-educationschool-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.Education.Schools["10001"].Users["13006"]
+await graphClient.Education.Classes["{id}"].Teachers["14012"]
.Request() .DeleteAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-event-recurring-daily-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-event-recurring-daily-csharp-snippets.md
@@ -0,0 +1,64 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var @event = new Event
+{
+ Subject = "Let's go for lunch",
+ Body = new ItemBody
+ {
+ ContentType = BodyType.Html,
+ Content = "Does noon work for you?"
+ },
+ Start = new DateTimeTimeZone
+ {
+ DateTime = "2020-02-25T12:00:00",
+ TimeZone = "Pacific Standard Time"
+ },
+ End = new DateTimeTimeZone
+ {
+ DateTime = "2020-02-25T14:00:00",
+ TimeZone = "Pacific Standard Time"
+ },
+ Location = new Location
+ {
+ DisplayName = "Harry's Bar"
+ },
+ Attendees = new List<Attendee>()
+ {
+ new Attendee
+ {
+ EmailAddress = new EmailAddress
+ {
+ Address = "AlexW@contoso.OnMicrosoft.com",
+ Name = "Alex Wilbur"
+ },
+ Type = AttendeeType.Required
+ }
+ },
+ Recurrence = new PatternedRecurrence
+ {
+ Pattern = new RecurrencePattern
+ {
+ Type = RecurrencePatternType.Daily,
+ Interval = 1
+ },
+ Range = new RecurrenceRange
+ {
+ Type = RecurrenceRangeType.Numbered,
+ StartDate = new Date(2020,2,25),
+ NumberOfOccurrences = 2
+ }
+ }
+};
+
+await graphClient.Me.Events
+ .Request()
+ .Header("Prefer","outlook.timezone=\"Pacific Standard Time\"")
+ .AddAsync(@event);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-identityuserflowattributeassignment-from--csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-identityuserflowattributeassignment-from--csharp-snippets.md
@@ -21,7 +21,7 @@ var identityUserFlowAttributeAssignment = new IdentityUserFlowAttributeAssignmen
} };
-await graphClient.Identity.B2cUserFlows["B2C_1_Consumer"].UserAttributeAssignments
+await graphClient.Identity.B2xUserFlows["B2X_1_Partner"].UserAttributeAssignments
.Request() .AddAsync(identityUserFlowAttributeAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-item-attachment-from-event-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-item-attachment-from-event-csharp-snippets.md
@@ -0,0 +1,37 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var attachment = new ItemAttachment
+{
+ Name = "Holiday event",
+ Item = new Event
+ {
+ Subject = "Discuss gifts for children",
+ Body = new ItemBody
+ {
+ ContentType = BodyType.Html,
+ Content = "Let's look for funding!"
+ },
+ Start = new DateTimeTimeZone
+ {
+ DateTime = "2016-12-02T18:00:00",
+ TimeZone = "Pacific Standard Time"
+ },
+ End = new DateTimeTimeZone
+ {
+ DateTime = "2016-12-02T19:00:00",
+ TimeZone = "Pacific Standard Time"
+ }
+ }
+};
+
+await graphClient.Me.Events["{AAMkAGI1AAAt9AHjAAA=}"].Attachments
+ .Request()
+ .AddAsync(attachment);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-item-attachment-from-message-beta-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-item-attachment-from-message-beta-csharp-snippets.md
@@ -0,0 +1,37 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var attachment = new ItemAttachment
+{
+ Name = "Holiday event",
+ Item = new Event
+ {
+ Subject = "Discuss gifts for children",
+ Body = new ItemBody
+ {
+ ContentType = BodyType.Html,
+ Content = "Let's look for funding!"
+ },
+ Start = new DateTimeTimeZone
+ {
+ DateTime = "2016-12-02T18:00:00",
+ TimeZone = "Pacific Standard Time"
+ },
+ End = new DateTimeTimeZone
+ {
+ DateTime = "2016-12-02T19:00:00",
+ TimeZone = "Pacific Standard Time"
+ }
+ }
+};
+
+await graphClient.Me.Messages["AAMkpsDRVK"].Attachments
+ .Request()
+ .AddAsync(attachment);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-item-attachment-with-post-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-item-attachment-with-post-csharp-snippets.md
@@ -0,0 +1,49 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var post = new Post
+{
+ Body = new ItemBody
+ {
+ ContentType = BodyType.Text,
+ Content = "I attached an event."
+ },
+ Attachments = new PostAttachmentsCollectionPage()
+ {
+ new ItemAttachment
+ {
+ Name = "Holiday event",
+ Item = new Event
+ {
+ Subject = "Discuss gifts for children",
+ Body = new ItemBody
+ {
+ ContentType = BodyType.Html,
+ Content = "Let's look for funding!"
+ },
+ Start = new DateTimeTimeZone
+ {
+ DateTime = "2019-12-02T18:00:00",
+ TimeZone = "Pacific Standard Time"
+ },
+ End = new DateTimeTimeZone
+ {
+ DateTime = "2019-12-02T19:00:00",
+ TimeZone = "Pacific Standard Time"
+ }
+ }
+ }
+ }
+};
+
+await graphClient.Groups["1848753d-185d-4c08-a4e4-6ee40521d115"].Threads["AAQkADJUdfolA=="]
+ .Reply(post)
+ .Request()
+ .PostAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-listitem-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-listitem-csharp-snippets.md
@@ -6,21 +6,17 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var listItem = new ListItem
+var fieldValueSet = new FieldValueSet
{
- Fields = new FieldValueSet
+ AdditionalData = new Dictionary<string, object>()
{
- AdditionalData = new Dictionary<string, object>()
- {
- {"Title", "Widget"},
- {"Color", "Purple"},
- {"Weight", "32"}
- }
+ {"Color", "Fuchsia"},
+ {"Quantity", "934"}
} };
-await graphClient.Sites["{site-id}"].Lists["{list-id}"].Items
+await graphClient.Sites["{site-id}"].Lists["{list-id}"].Items["{item-id}"].Fields
.Request()
- .AddAsync(listItem);
+ .UpdateAsync(fieldValueSet);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-permission-from--csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-permission-from--csharp-snippets.md
@@ -0,0 +1,32 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permission = new Permission
+{
+ Roles = new List<String>()
+ {
+ "write"
+ },
+ GrantedToIdentities = new List<IdentitySet>()
+ {
+ new IdentitySet
+ {
+ Application = new Identity
+ {
+ Id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
+ DisplayName = "Foo App"
+ }
+ }
+ }
+};
+
+await graphClient.Sites["{sitesId}"].Permissions
+ .Request()
+ .AddAsync(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-trustframeworkkeyset-from-trustframework1-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/create-trustframeworkkeyset-from-trustframework1-csharp-snippets.md
@@ -0,0 +1,18 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var trustFrameworkKeySet = new TrustFrameworkKeySet
+{
+ Id = "keyset1"
+};
+
+await graphClient.TrustFramework.KeySets
+ .Request()
+ .AddAsync(trustFrameworkKeySet);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/delete-b2xuserflows-identityproviders-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/delete-b2xuserflows-identityproviders-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.Identity.B2xUserFlows["B2X_1_PartnerSignUp"].IdentityProviders["Facebook-OAUTH"].Reference
+await graphClient.Identity.B2cUserFlows["B2C_1_CustomerSignUp"].IdentityProviders["Facebook-OAUTH"].Reference
.Request() .DeleteAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/delete-educationassignment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/delete-educationassignment-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.Education.Classes["11014"].Assignments["19002"]
+await graphClient.Education.Classes["11014"].AssignmentCategories["19002"]
.Request() .DeleteAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/delete-permission-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/delete-permission-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.Me.Drive.Root.Items["{item-id}"].Permissions["{perm-id}"]
+await graphClient.Sites["{sitesId}"].Permissions["{permissionId}"]
.Request() .DeleteAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/event-delta-events-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/event-delta-events-csharp-snippets.md
@@ -0,0 +1,19 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var queryOptions = new List<QueryOption>()
+{
+ new QueryOption("startDateTime", "2020-06-12T00:00:00Z")
+};
+
+var delta = await graphClient.Me.Calendar.Events
+ .Delta()
+ .Request( queryOptions )
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-a-count-endswith-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-a-count-endswith-csharp-snippets.md
@@ -9,8 +9,8 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var users = await graphClient.Users .Request() .Header("ConsistencyLevel","eventual")
- .Filter("endswith(mail,'a@contoso.com'),")
- .OrderBy("userPrincipalName ")
+ .Filter("endswith(mail,'a@contoso.com')")
+ .OrderBy("userPrincipalName")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-accesspackageresourceenvironment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-accesspackageresourceenvironment-csharp-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var accessPackageResourceEnvironment = await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageResourceEnvironments["{accessPackageResourceEnvironmentId}"]
+ .Request()
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-accesspackageresourceroles-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-accesspackageresourceroles-csharp-snippets.md
@@ -8,7 +8,7 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var accessPackageResourceRoles = await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs["15d889df-3eb8-4e9b-bfb4-b1908849aec4"].AccessPackageResourceRoles .Request()
- .Filter("(originSystem eq 'AadGroup' and accessPackageResource/id eq 'a35bef72-a8aa-4ca3-af30-f6b2ece7208f'),")
+ .Filter("(originSystem eq 'AadGroup' and accessPackageResource/id eq 'a35bef72-a8aa-4ca3-af30-f6b2ece7208f')")
.Expand("accessPackageResource/id%20eq%20'a35bef72-a8aa-4ca3-af30-f6b2ece7208f')") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-accessreviews-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-accessreviews-csharp-snippets.md
@@ -8,7 +8,7 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var accessReviews = await graphClient.AccessReviews .Request()
- .Filter("businessFlowTemplateId eq '6e4f3d20-c5c3-407f-9695-8460952bcc68',")
+ .Filter("businessFlowTemplateId eq '6e4f3d20-c5c3-407f-9695-8460952bcc68'")
.Skip(0) .Top(100) .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-bitlockerrecoverykey-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-bitlockerrecoverykey-csharp-snippets.md
@@ -6,11 +6,9 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var recoveryKeys = await graphClient.Bitlocker.RecoveryKeys
+var bitlockerRecoveryKey = await graphClient.Bitlocker.RecoveryKeys["b465e4e8-e4e8-b465-e8e4-65b4e8e465b4"]
.Request()
- .Header("ocp-client-name","\"My Friendly Client\"")
- .Header("ocp-client-version","\"1.2\"")
- .Filter("deviceId eq '1ab40ab2-32a8-4b00-b6b5-ba724e407de9'")
+ .Select("key")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-buckets-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-buckets-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var buckets = await graphClient.Planner.Plans["2txjA-BMZEq-bKi6Wfj5aGQAB1OJ"].Buckets
+var buckets = await graphClient.Planner.Buckets
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-classes-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-classes-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var classes = await graphClient.Education.Classes
+var classes = await graphClient.Education.Schools["10002"].Classes
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-cloudpconpremisesconnection-withdetails-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-cloudpconpremisesconnection-withdetails-csharp-snippets.md
@@ -8,7 +8,7 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var cloudPcOnPremisesConnection = await graphClient.DeviceManagement.VirtualEndpoint.OnPremisesConnections["{id}"] .Request()
- .Select("id,displayName,subscriptionId,subscriptionName,adDomainName,adDomainUsername,organizationalUnit,virtualNetworkId,subnetId,healthCheckStatus,healthCheckStatusDetails,inUse")
+ .Select("id,displayName,healthCheckStatus,healthCheckStatusDetails,inUse")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-connectors-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-connectors-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var connectors = await graphClient.OnPremisesPublishingProfiles["applicationProxy"].Connectors
+var connectors = await graphClient.Print.Connectors
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-contract-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-contract-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var contract = await graphClient.Contracts["{id}"]
+var contracts = await graphClient.Contracts
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-custodian-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-custodian-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var custodians = await graphClient.Compliance.Ediscovery.Cases["2192ca408ea2410eba3bec8ae873be6b"].Custodians
+var custodian = await graphClient.Compliance.Ediscovery.Cases["2192ca408ea2410eba3bec8ae873be6b"].Custodians["45454331323337443946343043464239"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-educationuser-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-educationuser-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var educationUser = await graphClient.Education.Users["13012"]
+var user = await graphClient.Education.Me.User
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-emailauthenticationmethod-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-emailauthenticationmethod-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var emailAuthenticationMethod = await graphClient.Me.Authentication.EmailMethods["3ddfcfc8-9383-446f-83cc-3ab9be4be18f"]
+var emailMethods = await graphClient.Me.Authentication.EmailMethods
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-endpoints-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-endpoints-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var reportRoot = await graphClient.Print.Reports["dailyPrintUsageSummariesByPrinter"]
+var endpoints = await graphClient.Groups["{id}"].Endpoints
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-group-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-group-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var groups = await graphClient.TermStore.Groups
+var group = await graphClient.Groups["45b7d2e7-b882-4a80-ba97-10b7a63b8fa4"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-grouplifecyclepolicy-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-grouplifecyclepolicy-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var groupLifecyclePolicies = await graphClient.GroupLifecyclePolicies
+var groupLifecyclePolicy = await graphClient.GroupLifecyclePolicies["{id}"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-identityprovider-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-identityprovider-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var identityProvider = await graphClient.IdentityProviders["{id}"]
+var identityProviders = await graphClient.IdentityProviders
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-itemphone-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-itemphone-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var phones = await graphClient.Me.Profile.Phones
+var itemPhone = await graphClient.Me.Profile.Phones["{id}"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-jobs-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-jobs-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var jobs = await graphClient.Print.Printers["{id}"].Jobs
+var jobs = await graphClient.ServicePrincipals["{id}"].Synchronization.Jobs
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-messages-with-mentions-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-messages-with-mentions-csharp-snippets.md
@@ -8,7 +8,7 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var messages = await graphClient.Me.Messages .Request()
- .Filter("MentionsPreview/IsMentioned eq true,")
+ .Filter("MentionsPreview/IsMentioned eq true")
.Select("subject,sender,receivedDateTime,mentionsPreview") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-names-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-names-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var names = await graphClient.Me.Drive.Items["{id}"].Workbook.Names
+var names = await graphClient.Me.Profile.Names
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-opentypeextension-3-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-opentypeextension-3-csharp-snippets.md
@@ -8,7 +8,6 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var message = await graphClient.Me.Messages["AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl==="] .Request()
- .Filter("id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')")
.Expand("extensions($filter=id%20eq%20'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-passwordlessmicrosoftauthenticatorauthenticationmethod-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-passwordlessmicrosoftauthenticatorauthenticationmethod-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var passwordlessMicrosoftAuthenticatorAuthenticationMethod = await graphClient.Me.Authentication.PasswordlessMicrosoftAuthenticatorMethods["R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1"]
+var passwordlessMicrosoftAuthenticatorMethods = await graphClient.Me.Authentication.PasswordlessMicrosoftAuthenticatorMethods
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-permission-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-permission-csharp-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permission = await graphClient.Sites["{sitesId}"].Permissions["{permissionId}"]
+ .Request()
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-plans-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-plans-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var plans = await graphClient.Planner.Plans
+var plans = await graphClient.Me.Planner.Plans
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-printjob-withtasks-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-printjob-withtasks-csharp-snippets.md
@@ -0,0 +1,14 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var printJob = await graphClient.Print.Printers["c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb"].Jobs["5182"]
+ .Request()
+ .Expand("tasks")
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-privilegedapproval-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-privilegedapproval-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var privilegedApproval = await graphClient.PrivilegedApproval["{id}"]
+var privilegedApproval = await graphClient.PrivilegedApproval
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-replies-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-replies-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var replies = await graphClient.Drive.Items["{id}"].Workbook.Comments["{id}"].Replies
+var replies = await graphClient.Chats["{id}"].Messages["{id}"].Replies
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-roleassignments-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-roleassignments-csharp-snippets.md
@@ -8,7 +8,6 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var roleAssignments = await graphClient.RoleManagement.Directory.RoleAssignments .Request()
- .Filter(" principalId eq 'f1847572-48aa-47aa-96a3-2ec61904f41f'")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-settings-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-settings-csharp-snippets.md
@@ -6,11 +6,8 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var analytics = await graphClient.Me.Analytics
+var settings = await graphClient.Settings
.Request()
- .Select("Settings")
.GetAsync();
-var settings = analytics.Settings;
- ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-signin-last-time-filter-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-signin-last-time-filter-csharp-snippets.md
@@ -8,7 +8,7 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var users = await graphClient.Users .Request()
- .Filter("startswith(displayName,'Eric'),")
+ .Filter("startswith(displayName,'Eric')")
.Select("displayName,signInActivity") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-singlevaluelegacyextendedproperty-1-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-singlevaluelegacyextendedproperty-1-csharp-snippets.md
@@ -8,7 +8,6 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var message = await graphClient.Me.Messages["AAMkAGE1M2_bs88AACHsLqWAAA="] .Request()
- .Filter("id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color')")
.Expand("singleValueExtendedProperties($filter=id%20eq%20'String%20%7B66f5a359-4659-4830-9070-00047ec6ac6e%7D%20Name%20Color')") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-swapshiftschangerequest-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-swapshiftschangerequest-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var swapShiftsChangeRequest = await graphClient.Teams["{teamId}"].Schedule.SwapShiftsChangeRequests["{swapShiftsChangeRequestId}"]
+var swapShiftsChangeRequests = await graphClient.Teams["{teamId}"].Schedule.SwapShiftsChangeRequests
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-synchronizationschema-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-synchronizationschema-csharp-snippets.md
@@ -6,8 +6,9 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var synchronizationSchema = await graphClient.ServicePrincipals["{id}"].Synchronization.Jobs["{jobId}"].Schema
+var synchronizationSchema = await graphClient.ServicePrincipals["{servicePrincipalId}"].Synchronization.Jobs["{jobId}"].Schema
.Request()
+ .Header("Authorization","Bearer {Token}")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-term-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-term-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var term = await graphClient.TermStore.Groups["{groupId}"].Sets["{setId}"].Terms["{termId}"]
+var children = await graphClient.TermStore.Sets["{setId}"].Children
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-todotask-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-todotask-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var todoTask = await graphClient.Me.Todo.Lists["AAMkADA1MTHgwAAA="].Tasks["721a35e2-35e2-721a-e235-1a72e2351a72"]
+var tasks = await graphClient.Me.Todo.Lists["35e2-35e2-721a-e235-1a72e2351a7"].Tasks
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-todotasklist-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-todotasklist-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var lists = await graphClient.Me.Todo.Lists
+var todoTaskList = await graphClient.Me.Todo.Lists["AAMkADIyAAAAABrJAAA="]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-unifiedgroupsource-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-unifiedgroupsource-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var unifiedGroupSources = await graphClient.Compliance.Ediscovery.Cases["4c8f8f70-7785-4bd4-b296-c98376a2c5e1"].Custodians["2192ca408ea2410eba3bec8ae873be6b"].UnifiedGroupSources
+var unifiedGroupSource = await graphClient.Compliance.Ediscovery.Cases["4c8f8f70-7785-4bd4-b296-c98376a2c5e1"].Custodians["2192ca408ea2410eba3bec8ae873be6b"].UnifiedGroupSources["33434233-3030-3739-3043-393039324633"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-unifiedroleassignment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-unifiedroleassignment-csharp-snippets.md
@@ -6,9 +6,9 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var unifiedRoleAssignment = await graphClient.RoleManagement.Directory.RoleAssignments["lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1"]
+var unifiedRoleAssignmentMultiple = await graphClient.RoleManagement.DeviceManagement.RoleAssignments["lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1"]
.Request()
- .Expand("directoryScope")
+ .Expand("directoryScopes")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-unifiedroleassignmentmultiple-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-unifiedroleassignmentmultiple-csharp-snippets.md
@@ -8,7 +8,6 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var roleAssignments = await graphClient.RoleManagement.DeviceManagement.RoleAssignments .Request()
- .Filter(" principalIds/any(x:x eq '564ae70c-73d9-476b-820b-fb61eb7384b9')")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-userflowlanguagepage-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-userflowlanguagepage-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var stream = await graphClient.Identity.B2cUserFlows["B2C_1_Customer"].Languages["en"].DefaultPages["idpselections"].Content
+var defaultPages = await graphClient.Identity.B2cUserFlows["B2C_1_Customer"].Languages["en"].DefaultPages
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-usersource-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/get-usersource-csharp-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var userSources = await graphClient.Compliance.Ediscovery.Cases["4c8f8f70-7785-4bd4-b296-c98376a2c5e1"].Custodians["2192ca408ea2410eba3bec8ae873be6b"].UserSources
+ .Request()
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/group-create-approleassignment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/group-create-approleassignment-csharp-snippets.md
@@ -13,7 +13,7 @@ var appRoleAssignment = new AppRoleAssignment
AppRoleId = Guid.Parse("appRoleId-value") };
-await graphClient.ServicePrincipals["{id}"].AppRoleAssignments
+await graphClient.Groups["{id}"].AppRoleAssignments
.Request() .AddAsync(appRoleAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/list-accesspackageresourceenvironment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/list-accesspackageresourceenvironment-csharp-snippets.md
@@ -0,0 +1,14 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var accessPackageResourceEnvironments = await graphClient.IdentityGovernance.EntitlementManagement.AccessPackageResourceEnvironments
+ .Request()
+ .Filter("originSystem eq 'SharePointOnline'")
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/list-permission-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/list-permission-csharp-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permissions = await graphClient.Sites["{sitesId}"].Permissions
+ .Request()
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/list-teamsapp-with-filter-expand-appdefinitions-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/list-teamsapp-with-filter-expand-appdefinitions-csharp-snippets.md
@@ -8,7 +8,7 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var teamsApps = await graphClient.AppCatalogs.TeamsApps .Request()
- .Filter("id eq '876df28f-2e78-423b-94a5-44181bd0e225',")
+ .Filter("id eq '876df28f-2e78-423b-94a5-44181bd0e225'")
.Expand("appDefinitions") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/list-usageright-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/list-usageright-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var usageRights = await graphClient.Users["{userId}"].UsageRights
+var usageRights = await graphClient.Devices["{objectId}"].UsageRights
.Request() .Filter("state in ('active', 'suspended') and serviceIdentifier in ('ABCD')") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/sendreminder-accessreview-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/sendreminder-accessreview-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.AccessReviews["2975E9B5-44CE-4E71-93D3-30F03B5AA992"]
+await graphClient.IdentityGovernance.AccessReviews.Definitions["04e5c3b2-9db2-40d3-a204-128f4956ae8e"].Instances["70463350-742e-4909-bfa5-bc23447bd002"]
.SendReminder() .Request() .PostAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/shift-get-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/shift-get-csharp-snippets.md
@@ -6,8 +6,43 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var shiftPreferences = await graphClient.Users["871dbd5c-3a6a-4392-bfe1-042452793a50"].ShiftPreferences
+var shiftPreferences = new ShiftPreferences
+{
+ Id = "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7",
+ Availability = new List<ShiftAvailability>()
+ {
+ new ShiftAvailability
+ {
+ Recurrence = new PatternedRecurrence
+ {
+ Pattern = new RecurrencePattern
+ {
+ Type = RecurrencePatternType.Weekly,
+ DaysOfWeek = new List<DayOfWeek>()
+ {
+ DayOfWeek.Monday,
+ DayOfWeek.Wednesday,
+ DayOfWeek.Friday
+ },
+ Interval = 1
+ },
+ Range = new RecurrenceRange
+ {
+ Type = RecurrenceRangeType.NoEnd
+ }
+ },
+ TimeZone = "Pacific Standard Time",
+ TimeSlots = null
+ }
+ },
+ AdditionalData = new Dictionary<string, object>()
+ {
+ {"@odata.etag", "1a371e53-f0a6-4327-a1ee-e3c56e4b38aa"}
+ }
+};
+
+await graphClient.Users["871dbd5c-3a6a-4392-bfe1-042452793a50"].Settings.ShiftPreferences
.Request()
- .GetAsync();
+ .PutAsync(shiftPreferences);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/update-organizationalbrandingproperties-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/update-organizationalbrandingproperties-csharp-snippets.md
@@ -6,14 +6,13 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var organizationalBrandingLocalization = new OrganizationalBrandingLocalization
+var organizationalBranding = new OrganizationalBranding
{
- BackgroundColor = "#00000F",
- SignInPageText = "fr"
+ BackgroundColor = "#FFFF33"
};
-await graphClient.Organization["d69179bf-f4a4-41a9-a9de-249c0f2efb1d"].Branding.Localizations["fr"]
+await graphClient.Organization["d69179bf-f4a4-41a9-a9de-249c0f2efb1d"].Branding
.Request()
- .PutAsync(organizationalBrandingLocalization);
+ .PutAsync(organizationalBranding);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/update-page-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/update-page-csharp-snippets.md
@@ -6,27 +6,25 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var stream = new List<Stream>()
-{
- new Stream
- {
- Target = "#para-id",
- Action = "insert",
- Position = "before",
- Content = "<img src=\"image-url-or-part-name\" alt=\"image-alt-text\" />"
- },
- new Stream
- {
- Target = "#list-id",
- Action = "append",
- Content = "<li>new-page-content</li>"
- }
-};
+var stream = new System.IO.MemoryStream(Encoding.UTF8.GetBytes(@"[
+ {
+ 'target':'#para-id',
+ 'action':'insert',
+ 'position':'before',
+ 'content':'<img src=""image-url-or-part-name"" alt=""image-alt-text"" />'
+ },
+ {
+ 'target':'#list-id',
+ 'action':'append',
+ 'content':'<li>new-page-content</li>'
+ }
+]
+"));
var pages = new OnenotePage();
-pages.Content = content;
+pages.Content = stream;
-await graphClient.Me.Onenote.Pages["{id}"].Content
+await graphClient.Me.Onenote.Pages["{id}"]
.Request() .UpdateAsync(pages);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/update-permission-from--csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/update-permission-from--csharp-snippets.md
@@ -0,0 +1,21 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permission = new Permission
+{
+ Roles = new List<String>()
+ {
+ "read"
+ }
+};
+
+await graphClient.Sites["{sitesId}"].Permissions["{permissionId}"]
+ .Request()
+ .UpdateAsync(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/user-list-teamsapps-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/csharp/user-list-teamsapps-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var userScopeTeamsAppInstallation = await graphClient.Users["{id}"].Teamwork.InstalledApps["{id}"]
+var installedApps = await graphClient.Users["{id}"].Teamwork.InstalledApps
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/cloudpconpremisesconnection-runhealthcheck-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/cloudpconpremisesconnection-runhealthcheck-java-snippets.md
@@ -6,8 +6,8 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.deviceManagement().virtualEndpoint().cloudPCs("{id}")
- .reprovision()
+graphClient.deviceManagement().virtualEndpoint().onPremisesConnections("{id}")
+ .runHealthChecks()
.buildRequest() .post();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-java-snippets.md
@@ -0,0 +1,25 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+AccessPackageResourceRequest accessPackageResourceRequest = new AccessPackageResourceRequest();
+accessPackageResourceRequest.catalogId = "de9315c1-272b-4905-924b-cc112ca180c7";
+AccessPackageResource accessPackageResource = new AccessPackageResource();
+accessPackageResource.displayName = "Community Outreach";
+accessPackageResource.description = "https://contoso.sharepoint.com/sites/CSR";
+accessPackageResource.resourceType = "SharePoint Online Site";
+accessPackageResource.originId = "https://contoso.sharepoint.com/sites/CSR";
+accessPackageResource.originSystem = "SharePointOnline";
+accessPackageResource.additionalDataManager().put("accessPackageResourceEnvironment@odata.bind", new JsonPrimitive("accessPackageResourceEnvironments/615f2218-678f-471f-a60a-02c2f4f80c57"));
+accessPackageResourceRequest.accessPackageResource = accessPackageResource;
+accessPackageResourceRequest.requestType = "AdminAdd";
+
+graphClient.identityGovernance().entitlementManagement().accessPackageResourceRequests()
+ .buildRequest()
+ .post(accessPackageResourceRequest);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-java-snippets.md
@@ -0,0 +1,27 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+AccessPackageResourceRequest accessPackageResourceRequest = new AccessPackageResourceRequest();
+accessPackageResourceRequest.catalogId = "de9315c1-272b-4905-924b-cc112ca180c7";
+AccessPackageResource accessPackageResource = new AccessPackageResource();
+accessPackageResource.displayName = "Community Outreach";
+accessPackageResource.description = "https://contoso.sharepoint.com/sites/CSR";
+accessPackageResource.resourceType = "SharePoint Online Site";
+accessPackageResource.originId = "https://contoso.sharepoint.com/sites/CSR";
+accessPackageResource.originSystem = "SharePointOnline";
+AccessPackageResourceEnvironment accessPackageResourceEnvironment = new AccessPackageResourceEnvironment();
+accessPackageResourceEnvironment.originId = "https://contoso-admin.sharepoint.com/";
+accessPackageResource.accessPackageResourceEnvironment = accessPackageResourceEnvironment;
+accessPackageResourceRequest.accessPackageResource = accessPackageResource;
+accessPackageResourceRequest.requestType = "AdminAdd";
+
+graphClient.identityGovernance().entitlementManagement().accessPackageResourceRequests()
+ .buildRequest()
+ .post(accessPackageResourceRequest);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-chatmessage-from-channel-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-chatmessage-from-channel-java-snippets.md
@@ -7,36 +7,9 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient(); ChatMessage chatMessage = new ChatMessage();
-chatMessage.subject = null;
ItemBody body = new ItemBody();
-body.contentType = BodyType.HTML;
-body.content = "<attachment id=\"74d20c7f34aa4a7fb74e2b30004247c5\"></attachment>";
+body.content = "Hello World";
chatMessage.body = body;
-LinkedList<ChatMessageAttachment> attachmentsList = new LinkedList<ChatMessageAttachment>();
-ChatMessageAttachment attachments = new ChatMessageAttachment();
-attachments.id = "74d20c7f34aa4a7fb74e2b30004247c5";
-attachments.contentType = "application/vnd.microsoft.card.adaptive";
-attachments.contentUrl = null;
-attachments.content = "{\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"type\": \"AdaptiveCard\",\r\n \"version\": \"1.2\",\r\n \"speak\": \"The Seattle Seahawks beat the Carolina Panthers 40-7\",\r\n \"body\": [\r\n {\r\n \"type\": \"Container\",\r\n \"items\": [\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"../hostedContents/1/$value\",\r\n \"size\": \"Medium\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"SHADES\",\r\n \"horizontalAlignment\": \"Center\",\r\n \"weight\": \"Bolder\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"stretch\",\r\n \"separator\": true,\r\n \"spacing\": \"Medium\",\r\n \"items\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"2019-08-31T19:30:00Z\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"Final\",\r\n \"spacing\": \"None\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"40 - 7\",\r\n \"size\": \"ExtraLarge\",\r\n \"horizontalAlignment\": \"Center\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"separator\": true,\r\n \"spacing\": \"Medium\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"../hostedContents/2/$value\",\r\n \"size\": \"Medium\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"SKINS\",\r\n \"horizontalAlignment\": \"Center\",\r\n \"weight\": \"Bolder\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}";
-attachments.name = null;
-attachments.thumbnailUrl = null;
-attachmentsList.add(attachments);
-chatMessage.attachments = attachmentsList;
-LinkedList<ChatMessageHostedContent> hostedContentsList = new LinkedList<ChatMessageHostedContent>();
-ChatMessageHostedContent hostedContents = new ChatMessageHostedContent();
-hostedContents.additionalDataManager().put("@microsoft.graph.temporaryId", new JsonPrimitive("1"));
-hostedContents.contentBytes = Base64.getDecoder().decode("iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaK6UvXb169ToGNuA0Cp+oYVHlxsYGK2QVEFqnT5/eej8/+9nPtr73LwjvFZPxeK84GsMpJHueEniGFJ7785///Ox73/vell/84hcUaoSff/WrX92aOMeCz64UVo389eTJk//1ne98Z/OnP/3p22+99dZ7NlZpaORGw6Ure0Kk72GD73/vfFU0BjQ6KT5lI8UsRjiS6vNFpFibhecoKaBTh9QXv/jF2Y9+9KPZr371K1qDJkqs09jhL14cPLzxxhtudzhogoZNW/ZEe4zLYSECC4ViRRwCghODxWOFOsIO4YzOwV47lxQhdf/9928dCfUJ8GXwnDgiHbpOU4Ijfzu6+pDtD280dJqyJ0A4ud3sahE65pBhhXDKdUEyAnDIQdgnpBBOL774In1fqQ1dp6lBnXONgUU0fNaxB2KuCad09Ek94bA/53wOdgwGAtsWbxiEQwRz15DCkZPHEeY6eE0cgbL3IumhT7L94IWG0Cr2oGNm0HNUwCmX99+gmP/wOF1pC6e8Oefn2obUww8/3Gu+KRX8BVb6POZY4C8Ftg880CBi7JezrzRdx7NT5twJTeBoARP1bFtTaxNSJ0+epNs7lKGOPqco5aVjq9BAitkvIqCyrzRtAp0y9Sc+Q5x3N5VjADYNqVxzT13gFJ29N0kHZzI5Tu9pKC2yX8JSeJfveE8pxeBF0XP97dAHQpRtfypNQqrkgAq86yR55qdoMAX2C5ggH3z+qam+p0OY+2HPWyLPAbgupGoIqEBB5c/7aIqGE9gPiz3FW6bPqV/Jp3jLeJ36rQqpmgIq0KmfL3yIxeqeyCkaUGA/zLL+KTUEVdtP/YZaYpCCx3KMZSFV2iR5G7k+dJgi9EFW8wRwkLRrWUANdsVzCjhtY8VkHAucRZdQXoeFFJYZsNevBeqk5Ql+WM17wjTT1l1EWUBluW+xtyaL+zC4S1gH1VebUG6ChVQJ66D6Sl0nucVhHG3fnYGFVFXzUMs0+ZvT+Vw6q5SnM3FIYSU5e80aaWW6j8QfOp1azKQ4oHAHA/agKq36ZAcBxh5TK/xNlvK0LwQUrsVD4LPXrJHH6bEkDakdN+NbDCh8mlfNcoOmlk0s1/hp3jqpPsX68pe/vB1SNX6at44+7UsvUUjRu4Vu/4f9wqiOogIszowLOrajqABHCfF77eIHP/jB9lEUe53a6WgqPVbnlpbeznj7P+yXil9V3lU8NzXGo6ig79qpb3zjG9shdfbsWfoaY6C5qXSwNpHVuIWV91vf+of9Eu4LxR48CouH9/gbdExzLDFcdL3Ygdp64YUXtkNqzHXCHB57/9Jez4vxb5skZ7b+Yb9Y1N0NUlvskDmuNRpan/VAf/rTn7ZCCrf8Zc89JroVcRr4i5HVdw3Mf9MvgYht/WP+APZEoxE6ZA0XEPfV9VQGyxjwByE1xgnzmCbQ++u4GBrLnBp/3TsCahSLN9cJA3fMpzAB+7Cgibffftv6xEchNYZFruv0PTWWTp/q4VujWn2DMkIKd9pkTzYqGLgJJviq0OVTPsxFhT8XLlygzztGrBbSTMu5KBw97bHuRYNoldHPRwU4MpjCfFTQZr4Fn+gt/nn11Vfpc46RxwXaU4D+1fCsBFNJx6xb0QBqAiFV5d0Ouqj5bgdtNb1MBgH14YcfWl+49ec3v/kNfc4x0lKE9hoGFMIJNypodWrHIKTYC4xSx08hqtRkUhhBFgcU/rzxxhv0OcdIk+ft4Mjzj3/84/+xWs5hvSUWhvcOp0AhNVKrBt9TTz01e+WVV2z/8z/vvPMOfc4x0p07m8H6whVnIjhqwrRR40/s2lBIjRTu8BB3NIQTJsjff/992/fL/0wppHT7ltUQTpjL/cMf/vC3qHaYCMcndZ0mw9uYVEhdvXqVto8RAhmnc4Cjpt/97ne2v5v9UUhNExYB43QOfvzjH7//+uuvv2undn+x/vCa1QqBhJUA7qF0u9nH/h+sBaOnOz4IxQAAAABJRU5ErkJggg==");
-hostedContents.contentType = "image/png";
-hostedContentsList.add(hostedContents);
-ChatMessageHostedContent hostedContents1 = new ChatMessageHostedContent();
-hostedContents1.additionalDataManager().put("@microsoft.graph.temporaryId", new JsonPrimitive("2"));
-hostedContents1.contentBytes = Base64.getDecoder().decode("iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEar6WzSnk5E4cUVpKz16yRVqb7SPym08nFTIoDCncwYA+q0qp3dhBg7DG1wt9kKS/7QkDhs3gIfPaaNfK4PJakIbXrZnyLAYV386pZbtDUsonlGt/NWyfVu1hPPfXUTkjV+G7eOnq3L71EIUXvFrrzH/YLozqLCrA4My7o2M6iApwlxPvaxSuvvLJzFsVep3Y6m0qP1bmlpbcz3vkP+6XiV5V3Fc9NjfEsKui7duq5557bCakzZ87Q1xgDzU2lg7WJrMYtrLzf+vY/7JdwXyj24FFYPL3H36BjmmOJ4UPXix2orbfeemsnpMZcJ8zhsf2X9np+GP9Hk+TM9j/sF4u6u0Fqix0yx2eNhtZnPdBXX321HVK45S977jHRrYjTwF+MrL5rYP6bfglEbPsf8wewJxqN0CFr+ABxX10vZbCMAX8QUmOcMI9pAr2/jouhscyp8de9I6BGsXhznTBwx3wJE7A3C5r4/PPPrU/8EFJjWOS6Tt9LY+n0rh6+NarVNygjpHCnTfZko4KBm2CCrwpd3uXDXFT4c+7cOfq8Y8RqIc20nIvC2dN+6140iFYZ/XxUgDODKcxHBW3mW/CO3uKf9957jz7nGHl8QHsK0L8aXpVgKmnTuhUNoCYQUlXe7aCLmu920FbTj8kgoL7//nvrC9f//OlPf6LPOUZaitBew4BCOOFGBa0u7RiEFHuBUer4LkSVmkwKI8jigMKfTz75hD7nGGnyvB2cef71r3/9P1bLOay3xMLw3uEUKKRGatXge/LJJ2fvvvuuHX/+54svvqDPOUa6c2czWF+44koEZ02YNmr8jl0bCqmRwh0e4o6GcMIE+bfffmvHfvmfKYWUbt+yGsIJc7mfffbZf0e1w0Q43qnrNBnexqRC6uOPP6btY4RAxuUc4Kzpo48+suPd7I9CapqwCBiXc/DGG298+8EHH/yXXdr9zfrDv1utEEhYCeAeSj82+8n/A1GsifSVBvjAAAAAAElFTkSuQmCC");
-hostedContents1.contentType = "image/png";
-hostedContentsList.add(hostedContents1);
-ChatMessageHostedContentCollectionResponse chatMessageHostedContentCollectionResponse = new ChatMessageHostedContentCollectionResponse();
-chatMessageHostedContentCollectionResponse.value = hostedContentsList;
-ChatMessageHostedContentCollectionPage chatMessageHostedContentCollectionPage = new ChatMessageHostedContentCollectionPage(chatMessageHostedContentCollectionResponse, null);
-chatMessage.hostedContents = chatMessageHostedContentCollectionPage;
graphClient.teams("{id}").channels("{id}").messages() .buildRequest()
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-directoryobject-from-device-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-directoryobject-from-device-java-snippets.md
@@ -9,7 +9,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
DirectoryObject directoryObject = new DirectoryObject(); directoryObject.id = "{id}";
-graphClient.devices("{id}").registeredOwners().references()
+graphClient.devices("{id}").registeredUsers().references()
.buildRequest() .post(directoryObject);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-educationclass-from-educationschool-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-educationclass-from-educationschool-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.education().schools("10001").users("13006")
+graphClient.education().classes("{id}").teachers("14012")
.buildRequest() .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-event-recurring-daily-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-event-recurring-daily-java-snippets.md
@@ -0,0 +1,54 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+LinkedList<Option> requestOptions = new LinkedList<Option>();
+requestOptions.add(new HeaderOption("Prefer", "outlook.timezone=\"Pacific Standard Time\""));
+
+Event event = new Event();
+event.subject = "Let's go for lunch";
+ItemBody body = new ItemBody();
+body.contentType = BodyType.HTML;
+body.content = "Does noon work for you?";
+event.body = body;
+DateTimeTimeZone start = new DateTimeTimeZone();
+start.dateTime = "2020-02-25T12:00:00";
+start.timeZone = "Pacific Standard Time";
+event.start = start;
+DateTimeTimeZone end = new DateTimeTimeZone();
+end.dateTime = "2020-02-25T14:00:00";
+end.timeZone = "Pacific Standard Time";
+event.end = end;
+Location location = new Location();
+location.displayName = "Harry's Bar";
+event.location = location;
+LinkedList<Attendee> attendeesList = new LinkedList<Attendee>();
+Attendee attendees = new Attendee();
+EmailAddress emailAddress = new EmailAddress();
+emailAddress.address = "AlexW@contoso.OnMicrosoft.com";
+emailAddress.name = "Alex Wilbur";
+attendees.emailAddress = emailAddress;
+attendees.type = AttendeeType.REQUIRED;
+attendeesList.add(attendees);
+event.attendees = attendeesList;
+PatternedRecurrence recurrence = new PatternedRecurrence();
+RecurrencePattern pattern = new RecurrencePattern();
+pattern.type = RecurrencePatternType.DAILY;
+pattern.interval = 1;
+recurrence.pattern = pattern;
+RecurrenceRange range = new RecurrenceRange();
+range.type = RecurrenceRangeType.NUMBERED;
+range.startDate = new DateOnly(1900,1,1);
+range.numberOfOccurrences = 2;
+recurrence.range = range;
+event.recurrence = recurrence;
+
+graphClient.me().events()
+ .buildRequest( requestOptions )
+ .post(event);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-identityuserflowattributeassignment-from--java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-identityuserflowattributeassignment-from--java-snippets.md
@@ -17,7 +17,7 @@ IdentityUserFlowAttribute userAttribute = new IdentityUserFlowAttribute();
userAttribute.id = "extension_guid_shoeSize"; identityUserFlowAttributeAssignment.userAttribute = userAttribute;
-graphClient.identity().b2cUserFlows("B2C_1_Consumer").userAttributeAssignments()
+graphClient.identity().b2xUserFlows("B2X_1_Partner").userAttributeAssignments()
.buildRequest() .post(identityUserFlowAttributeAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-item-attachment-from-event-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-item-attachment-from-event-java-snippets.md
@@ -0,0 +1,31 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+ItemAttachment attachment = new ItemAttachment();
+attachment.name = "Holiday event";
+Event item = new Event();
+item.subject = "Discuss gifts for children";
+ItemBody body = new ItemBody();
+body.contentType = BodyType.HTML;
+body.content = "Let's look for funding!";
+item.body = body;
+DateTimeTimeZone start = new DateTimeTimeZone();
+start.dateTime = "2016-12-02T18:00:00";
+start.timeZone = "Pacific Standard Time";
+item.start = start;
+DateTimeTimeZone end = new DateTimeTimeZone();
+end.dateTime = "2016-12-02T19:00:00";
+end.timeZone = "Pacific Standard Time";
+item.end = end;
+attachment.item = item;
+
+graphClient.me().events("{AAMkAGI1AAAt9AHjAAA=}").attachments()
+ .buildRequest()
+ .post(attachment);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-item-attachment-from-message-beta-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-item-attachment-from-message-beta-java-snippets.md
@@ -0,0 +1,31 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+ItemAttachment attachment = new ItemAttachment();
+attachment.name = "Holiday event";
+Event item = new Event();
+item.subject = "Discuss gifts for children";
+ItemBody body = new ItemBody();
+body.contentType = BodyType.HTML;
+body.content = "Let's look for funding!";
+item.body = body;
+DateTimeTimeZone start = new DateTimeTimeZone();
+start.dateTime = "2016-12-02T18:00:00";
+start.timeZone = "Pacific Standard Time";
+item.start = start;
+DateTimeTimeZone end = new DateTimeTimeZone();
+end.dateTime = "2016-12-02T19:00:00";
+end.timeZone = "Pacific Standard Time";
+item.end = end;
+attachment.item = item;
+
+graphClient.me().messages("AAMkpsDRVK").attachments()
+ .buildRequest()
+ .post(attachment);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-item-attachment-with-post-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-item-attachment-with-post-java-snippets.md
@@ -0,0 +1,43 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Post post = new Post();
+ItemBody body = new ItemBody();
+body.contentType = BodyType.TEXT;
+body.content = "I attached an event.";
+post.body = body;
+LinkedList<Attachment> attachmentsList = new LinkedList<Attachment>();
+ItemAttachment attachments = new ItemAttachment();
+attachments.name = "Holiday event";
+Event item = new Event();
+item.subject = "Discuss gifts for children";
+ItemBody body1 = new ItemBody();
+body1.contentType = BodyType.HTML;
+body1.content = "Let's look for funding!";
+item.body = body1;
+DateTimeTimeZone start = new DateTimeTimeZone();
+start.dateTime = "2019-12-02T18:00:00";
+start.timeZone = "Pacific Standard Time";
+item.start = start;
+DateTimeTimeZone end = new DateTimeTimeZone();
+end.dateTime = "2019-12-02T19:00:00";
+end.timeZone = "Pacific Standard Time";
+item.end = end;
+attachments.item = item;
+attachmentsList.add(attachments);
+AttachmentCollectionResponse attachmentCollectionResponse = new AttachmentCollectionResponse();
+attachmentCollectionResponse.value = attachmentsList;
+AttachmentCollectionPage attachmentCollectionPage = new AttachmentCollectionPage(attachmentCollectionResponse, null);
+post.attachments = attachmentCollectionPage;
+
+graphClient.groups("1848753d-185d-4c08-a4e4-6ee40521d115").threads("AAQkADJUdfolA==")
+ .reply(post)
+ .buildRequest()
+ .post();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-permission-from--java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-permission-from--java-snippets.md
@@ -0,0 +1,26 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Permission permission = new Permission();
+LinkedList<String> rolesList = new LinkedList<String>();
+rolesList.add("write");
+permission.roles = rolesList;
+LinkedList<IdentitySet> grantedToIdentitiesList = new LinkedList<IdentitySet>();
+IdentitySet grantedToIdentities = new IdentitySet();
+Identity application = new Identity();
+application.id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e";
+application.displayName = "Foo App";
+grantedToIdentities.application = application;
+grantedToIdentitiesList.add(grantedToIdentities);
+permission.grantedToIdentities = grantedToIdentitiesList;
+
+graphClient.sites("{sitesId}").permissions()
+ .buildRequest()
+ .post(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-trustframeworkkeyset-from-trustframework1-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/create-trustframeworkkeyset-from-trustframework1-java-snippets.md
@@ -0,0 +1,16 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+TrustFrameworkKeySet trustFrameworkKeySet = new TrustFrameworkKeySet();
+trustFrameworkKeySet.id = "keyset1";
+
+graphClient.trustFramework().keySets()
+ .buildRequest()
+ .post(trustFrameworkKeySet);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/delete-b2xuserflows-identityproviders-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/delete-b2xuserflows-identityproviders-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.identity().b2xUserFlows("B2X_1_PartnerSignUp").identityProviders("Facebook-OAUTH").reference()
+graphClient.identity().b2cUserFlows("B2C_1_CustomerSignUp").identityProviders("Facebook-OAUTH").reference()
.buildRequest() .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/delete-educationassignment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/delete-educationassignment-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.education().classes("11014").assignments("19002")
+graphClient.education().classes("11014").assignmentCategories("19002")
.buildRequest() .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/delete-permission-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/delete-permission-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.me().drive().root().items().{item-id}().permissions().{perm-id}()
+graphClient.sites("{sitesId}").permissions("{permissionId}")
.buildRequest() .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/event-delta-events-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/event-delta-events-java-snippets.md
@@ -0,0 +1,17 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+LinkedList<Option> requestOptions = new LinkedList<Option>();
+requestOptions.add(new QueryOption("startDateTime", "2020-06-12T00:00:00Z"));
+
+IEventDeltaCollectionPage delta = graphClient.me().calendar().events()
+ .delta()
+ .buildRequest( requestOptions )
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-a-count-endswith-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-a-count-endswith-java-snippets.md
@@ -11,8 +11,8 @@ requestOptions.add(new HeaderOption("ConsistencyLevel", "eventual"));
IUserCollectionPage users = graphClient.users() .buildRequest( requestOptions )
- .filter("endswith(mail,'a@contoso.com'),")
- .orderBy("userPrincipalName ")
+ .filter("endswith(mail,'a@contoso.com')")
+ .orderBy("userPrincipalName")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-accesspackageresourceenvironment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-accesspackageresourceenvironment-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+AccessPackageResourceEnvironment accessPackageResourceEnvironment = graphClient.identityGovernance().entitlementManagement().accessPackageResourceEnvironments("{accessPackageResourceEnvironmentId}")
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-accesspackageresourceroles-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-accesspackageresourceroles-java-snippets.md
@@ -8,7 +8,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
IAccessPackageResourceRoleCollectionPage accessPackageResourceRoles = graphClient.identityGovernance().entitlementManagement().accessPackageCatalogs("15d889df-3eb8-4e9b-bfb4-b1908849aec4").accessPackageResourceRoles() .buildRequest()
- .filter("(originSystem eq 'AadGroup' and accessPackageResource/id eq 'a35bef72-a8aa-4ca3-af30-f6b2ece7208f'),")
+ .filter("(originSystem eq 'AadGroup' and accessPackageResource/id eq 'a35bef72-a8aa-4ca3-af30-f6b2ece7208f')")
.expand("accessPackageResource/id%20eq%20'a35bef72-a8aa-4ca3-af30-f6b2ece7208f')") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-accessreviews-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-accessreviews-java-snippets.md
@@ -8,7 +8,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
IAccessReviewCollectionPage accessReviews = graphClient.accessReviews() .buildRequest()
- .filter("businessFlowTemplateId eq '6e4f3d20-c5c3-407f-9695-8460952bcc68',")
+ .filter("businessFlowTemplateId eq '6e4f3d20-c5c3-407f-9695-8460952bcc68'")
.skip(0) .top(100) .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-bitlockerrecoverykey-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-bitlockerrecoverykey-java-snippets.md
@@ -6,13 +6,9 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-LinkedList<Option> requestOptions = new LinkedList<Option>();
-requestOptions.add(new HeaderOption("ocp-client-name", "\"My Friendly Client\""));
-requestOptions.add(new HeaderOption("ocp-client-version", "\"1.2\""));
-
-IBitlockerRecoveryKeyCollectionPage recoveryKeys = graphClient.bitlocker().recoveryKeys()
- .buildRequest( requestOptions )
- .filter("deviceId eq '1ab40ab2-32a8-4b00-b6b5-ba724e407de9'")
+BitlockerRecoveryKey bitlockerRecoveryKey = graphClient.bitlocker().recoveryKeys("b465e4e8-e4e8-b465-e8e4-65b4e8e465b4")
+ .buildRequest()
+ .select("key")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-buckets-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-buckets-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IPlannerBucketCollectionPage buckets = graphClient.planner().plans("2txjA-BMZEq-bKi6Wfj5aGQAB1OJ").buckets()
+IPlannerBucketCollectionPage buckets = graphClient.planner().buckets()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-classes-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-classes-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IEducationClassCollectionPage classes = graphClient.education().classes()
+IEducationClassCollectionWithReferencesPage classes = graphClient.education().schools("10002").classes()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-cloudpconpremisesconnection-withdetails-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-cloudpconpremisesconnection-withdetails-java-snippets.md
@@ -8,7 +8,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
CloudPcOnPremisesConnection cloudPcOnPremisesConnection = graphClient.deviceManagement().virtualEndpoint().onPremisesConnections("{id}") .buildRequest()
- .select("id,displayName,subscriptionId,subscriptionName,adDomainName,adDomainUsername,organizationalUnit,virtualNetworkId,subnetId,healthCheckStatus,healthCheckStatusDetails,inUse")
+ .select("id,displayName,healthCheckStatus,healthCheckStatusDetails,inUse")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-connectors-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-connectors-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IConnectorCollectionPage connectors = graphClient.onPremisesPublishingProfiles("applicationProxy").connectors()
+IPrintConnectorCollectionPage connectors = graphClient.print().connectors()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-contract-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-contract-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-Contract contract = graphClient.contracts("{id}")
+IContractCollectionPage contracts = graphClient.contracts()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-custodian-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-custodian-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-ICustodianCollectionPage custodians = graphClient.compliance().ediscovery().cases("2192ca408ea2410eba3bec8ae873be6b").custodians()
+Custodian custodian = graphClient.compliance().ediscovery().cases("2192ca408ea2410eba3bec8ae873be6b").custodians("45454331323337443946343043464239")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-educationuser-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-educationuser-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-EducationUser educationUser = graphClient.education().users("13012")
+User user = graphClient.education().me().user()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-emailauthenticationmethod-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-emailauthenticationmethod-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-EmailAuthenticationMethod emailAuthenticationMethod = graphClient.me().authentication().emailMethods("3ddfcfc8-9383-446f-83cc-3ab9be4be18f")
+IEmailAuthenticationMethodCollectionPage emailMethods = graphClient.me().authentication().emailMethods()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-endpoints-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-endpoints-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-ReportRoot reportRoot = graphClient.print().reports("dailyPrintUsageSummariesByPrinter")
+IEndpointCollectionPage endpoints = graphClient.groups("{id}").endpoints()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-group-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-group-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IGroupCollectionPage groups = graphClient.termStore().groups()
+Group group = graphClient.groups("45b7d2e7-b882-4a80-ba97-10b7a63b8fa4")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-grouplifecyclepolicy-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-grouplifecyclepolicy-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IGroupLifecyclePolicyCollectionPage groupLifecyclePolicies = graphClient.groupLifecyclePolicies()
+GroupLifecyclePolicy groupLifecyclePolicy = graphClient.groupLifecyclePolicies("{id}")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-identityprovider-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-identityprovider-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IdentityProvider identityProvider = graphClient.identityProviders("{id}")
+IIdentityProviderCollectionPage identityProviders = graphClient.identityProviders()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-itemphone-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-itemphone-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IItemPhoneCollectionPage phones = graphClient.me().profile().phones()
+ItemPhone itemPhone = graphClient.me().profile().phones("{id}")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-jobs-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-jobs-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IPrintJobCollectionPage jobs = graphClient.print().printers("{id}").jobs()
+ISynchronizationJobCollectionPage jobs = graphClient.servicePrincipals("{id}").synchronization().jobs()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-messages-with-mentions-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-messages-with-mentions-java-snippets.md
@@ -8,7 +8,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
IMessageCollectionPage messages = graphClient.me().messages() .buildRequest()
- .filter("MentionsPreview/IsMentioned eq true,")
+ .filter("MentionsPreview/IsMentioned eq true")
.select("subject,sender,receivedDateTime,mentionsPreview") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-names-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-names-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IWorkbookNamedItemCollectionPage names = graphClient.me().drive().items("{id}").workbook().names()
+IPersonNameCollectionPage names = graphClient.me().profile().names()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-opentypeextension-3-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-opentypeextension-3-java-snippets.md
@@ -8,7 +8,6 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
Message message = graphClient.me().messages("AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===") .buildRequest()
- .filter("id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')")
.expand("extensions($filter=id%20eq%20'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-passwordlessmicrosoftauthenticatorauthenticationmethod-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-passwordlessmicrosoftauthenticatorauthenticationmethod-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-PasswordlessMicrosoftAuthenticatorAuthenticationMethod passwordlessMicrosoftAuthenticatorAuthenticationMethod = graphClient.me().authentication().passwordlessMicrosoftAuthenticatorMethods("R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1")
+IPasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionPage passwordlessMicrosoftAuthenticatorMethods = graphClient.me().authentication().passwordlessMicrosoftAuthenticatorMethods()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-permission-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-permission-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Permission permission = graphClient.sites("{sitesId}").permissions("{permissionId}")
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-plans-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-plans-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IPlannerPlanCollectionPage plans = graphClient.planner().plans()
+IPlannerPlanCollectionPage plans = graphClient.me().planner().plans()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-printjob-withtasks-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-printjob-withtasks-java-snippets.md
@@ -0,0 +1,14 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+PrintJob printJob = graphClient.print().printers("c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb").jobs("5182")
+ .buildRequest()
+ .expand("tasks")
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-privilegedapproval-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-privilegedapproval-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-PrivilegedApproval privilegedApproval = graphClient.privilegedApproval("{id}")
+IPrivilegedApprovalCollectionPage privilegedApproval = graphClient.privilegedApproval()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-replies-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-replies-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IWorkbookCommentReplyCollectionPage replies = graphClient.drive().items("{id}").workbook().comments("{id}").replies()
+IChatMessageCollectionPage replies = graphClient.chats("{id}").messages("{id}").replies()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-roleassignments-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-roleassignments-java-snippets.md
@@ -8,7 +8,6 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
IUnifiedRoleAssignmentCollectionPage roleAssignments = graphClient.roleManagement().directory().roleAssignments() .buildRequest()
- .filter(" principalId eq 'f1847572-48aa-47aa-96a3-2ec61904f41f'")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-settings-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-settings-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-Settings settings = graphClient.customRequest("/me/analytics/settings", Settings.class)
+IDirectorySettingCollectionPage settings = graphClient.settings()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-signin-last-time-filter-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-signin-last-time-filter-java-snippets.md
@@ -8,7 +8,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
IUserCollectionPage users = graphClient.users() .buildRequest()
- .filter("startswith(displayName,'Eric'),")
+ .filter("startswith(displayName,'Eric')")
.select("displayName,signInActivity") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-singlevaluelegacyextendedproperty-1-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-singlevaluelegacyextendedproperty-1-java-snippets.md
@@ -8,7 +8,6 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
Message message = graphClient.me().messages("AAMkAGE1M2_bs88AACHsLqWAAA=") .buildRequest()
- .filter("id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color')")
.expand("singleValueExtendedProperties($filter=id%20eq%20'String%20%7B66f5a359-4659-4830-9070-00047ec6ac6e%7D%20Name%20Color')") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-swapshiftschangerequest-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-swapshiftschangerequest-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-SwapShiftsChangeRequest swapShiftsChangeRequest = graphClient.teams("{teamId}").schedule().swapShiftsChangeRequests("{swapShiftsChangeRequestId}")
+ISwapShiftsChangeRequestCollectionPage swapShiftsChangeRequests = graphClient.teams("{teamId}").schedule().swapShiftsChangeRequests()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-synchronizationschema-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-synchronizationschema-java-snippets.md
@@ -6,8 +6,11 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-SynchronizationSchema synchronizationSchema = graphClient.servicePrincipals("{id}").synchronization().jobs("{jobId}").schema()
- .buildRequest()
+LinkedList<Option> requestOptions = new LinkedList<Option>();
+requestOptions.add(new HeaderOption("Authorization", "Bearer {Token}"));
+
+SynchronizationSchema synchronizationSchema = graphClient.servicePrincipals("{servicePrincipalId}").synchronization().jobs("{jobId}").schema()
+ .buildRequest( requestOptions )
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-term-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-term-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-Term term = graphClient.termStore().groups("{groupId}").sets("{setId}").terms("{termId}")
+ITermCollectionPage children = graphClient.termStore().sets("{setId}").children()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-todotask-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-todotask-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-TodoTask todoTask = graphClient.me().todo().lists("AAMkADA1MTHgwAAA=").tasks("721a35e2-35e2-721a-e235-1a72e2351a72")
+ITodoTaskCollectionPage tasks = graphClient.me().todo().lists("35e2-35e2-721a-e235-1a72e2351a7").tasks()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-todotasklist-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-todotasklist-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-ITodoTaskListCollectionPage lists = graphClient.me().todo().lists()
+TodoTaskList todoTaskList = graphClient.me().todo().lists("AAMkADIyAAAAABrJAAA=")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-unifiedgroupsource-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-unifiedgroupsource-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IUnifiedGroupSourceCollectionPage unifiedGroupSources = graphClient.compliance().ediscovery().cases("4c8f8f70-7785-4bd4-b296-c98376a2c5e1").custodians("2192ca408ea2410eba3bec8ae873be6b").unifiedGroupSources()
+UnifiedGroupSource unifiedGroupSource = graphClient.compliance().ediscovery().cases("4c8f8f70-7785-4bd4-b296-c98376a2c5e1").custodians("2192ca408ea2410eba3bec8ae873be6b").unifiedGroupSources("33434233-3030-3739-3043-393039324633")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-unifiedroleassignment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-unifiedroleassignment-java-snippets.md
@@ -6,9 +6,9 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-UnifiedRoleAssignment unifiedRoleAssignment = graphClient.roleManagement().directory().roleAssignments("lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1")
+UnifiedRoleAssignmentMultiple unifiedRoleAssignmentMultiple = graphClient.roleManagement().deviceManagement().roleAssignments("lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1")
.buildRequest()
- .expand("directoryScope")
+ .expand("directoryScopes")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-unifiedroleassignmentmultiple-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-unifiedroleassignmentmultiple-java-snippets.md
@@ -8,7 +8,6 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
IUnifiedRoleAssignmentMultipleCollectionPage roleAssignments = graphClient.roleManagement().deviceManagement().roleAssignments() .buildRequest()
- .filter(" principalIds/any(x:x eq '564ae70c-73d9-476b-820b-fb61eb7384b9')")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-userflowlanguagepage-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-userflowlanguagepage-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-InputStream stream = graphClient.identity().b2cUserFlows("B2C_1_Customer").languages("en").defaultPages("idpselections").content()
+IUserFlowLanguagePageCollectionPage defaultPages = graphClient.identity().b2cUserFlows("B2C_1_Customer").languages("en").defaultPages()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-usersource-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/get-usersource-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+IUserSourceCollectionPage userSources = graphClient.compliance().ediscovery().cases("4c8f8f70-7785-4bd4-b296-c98376a2c5e1").custodians("2192ca408ea2410eba3bec8ae873be6b").userSources()
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/group-create-approleassignment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/group-create-approleassignment-java-snippets.md
@@ -11,7 +11,7 @@ appRoleAssignment.principalId = UUID.fromString("principalId-value");
appRoleAssignment.resourceId = UUID.fromString("resourceId-value"); appRoleAssignment.appRoleId = UUID.fromString("appRoleId-value");
-graphClient.servicePrincipals("{id}").appRoleAssignments()
+graphClient.groups("{id}").appRoleAssignments()
.buildRequest() .post(appRoleAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/list-accesspackageresourceenvironment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/list-accesspackageresourceenvironment-java-snippets.md
@@ -0,0 +1,14 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+IAccessPackageResourceEnvironmentCollectionPage accessPackageResourceEnvironments = graphClient.identityGovernance().entitlementManagement().accessPackageResourceEnvironments()
+ .buildRequest()
+ .filter("originSystem eq 'SharePointOnline'")
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/list-permission-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/list-permission-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+IPermissionCollectionPage permissions = graphClient.sites("{sitesId}").permissions()
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/list-teamsapp-with-filter-expand-appdefinitions-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/list-teamsapp-with-filter-expand-appdefinitions-java-snippets.md
@@ -8,7 +8,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
ITeamsAppCollectionPage teamsApps = graphClient.appCatalogs().teamsApps() .buildRequest()
- .filter("id eq '876df28f-2e78-423b-94a5-44181bd0e225',")
+ .filter("id eq '876df28f-2e78-423b-94a5-44181bd0e225'")
.expand("appDefinitions") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/list-usageright-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/list-usageright-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IUsageRightCollectionPage usageRights = graphClient.users("{userId}").usageRights()
+IUsageRightCollectionPage usageRights = graphClient.devices("{objectId}").usageRights()
.buildRequest() .filter("state in ('active', 'suspended') and serviceIdentifier in ('ABCD')") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/sendreminder-accessreview-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/sendreminder-accessreview-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.accessReviews("2975E9B5-44CE-4E71-93D3-30F03B5AA992")
+graphClient.identityGovernance().accessReviews().definitions("04e5c3b2-9db2-40d3-a204-128f4956ae8e").instances("70463350-742e-4909-bfa5-bc23447bd002")
.sendReminder() .buildRequest() .post();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/shift-get-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/shift-get-java-snippets.md
@@ -6,8 +6,32 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-Content shiftPreferences = graphClient.users("871dbd5c-3a6a-4392-bfe1-042452793a50").shiftPreferences()
+ShiftPreferences shiftPreferences = new ShiftPreferences();
+shiftPreferences.id = "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7";
+shiftPreferences.additionalDataManager().put("@odata.etag", new JsonPrimitive("1a371e53-f0a6-4327-a1ee-e3c56e4b38aa"));
+LinkedList<ShiftAvailability> availabilityList = new LinkedList<ShiftAvailability>();
+ShiftAvailability availability = new ShiftAvailability();
+PatternedRecurrence recurrence = new PatternedRecurrence();
+RecurrencePattern pattern = new RecurrencePattern();
+pattern.type = RecurrencePatternType.WEEKLY;
+LinkedList<DayOfWeek> daysOfWeekList = new LinkedList<DayOfWeek>();
+daysOfWeekList.add(DayOfWeek.MONDAY);
+daysOfWeekList.add(DayOfWeek.WEDNESDAY);
+daysOfWeekList.add(DayOfWeek.FRIDAY);
+pattern.daysOfWeek = daysOfWeekList;
+pattern.interval = 1;
+recurrence.pattern = pattern;
+RecurrenceRange range = new RecurrenceRange();
+range.type = RecurrenceRangeType.NO_END;
+recurrence.range = range;
+availability.recurrence = recurrence;
+availability.timeZone = "Pacific Standard Time";
+availability.timeSlots = null;
+availabilityList.add(availability);
+shiftPreferences.availability = availabilityList;
+
+graphClient.users("871dbd5c-3a6a-4392-bfe1-042452793a50").settings().shiftPreferences()
.buildRequest()
- .get();
+ .put(shiftPreferences);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/update-organizationalbrandingproperties-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/update-organizationalbrandingproperties-java-snippets.md
@@ -6,12 +6,11 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-OrganizationalBrandingLocalization organizationalBrandingLocalization = new OrganizationalBrandingLocalization();
-organizationalBrandingLocalization.backgroundColor = "#00000F";
-organizationalBrandingLocalization.signInPageText = "fr";
+OrganizationalBranding organizationalBranding = new OrganizationalBranding();
+organizationalBranding.backgroundColor = "#FFFF33";
-graphClient.organization("d69179bf-f4a4-41a9-a9de-249c0f2efb1d").branding().localizations("fr")
+graphClient.organization("d69179bf-f4a4-41a9-a9de-249c0f2efb1d").branding()
.buildRequest()
- .put(organizationalBrandingLocalization);
+ .put(organizationalBranding);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/update-permission-from--java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/update-permission-from--java-snippets.md
@@ -0,0 +1,18 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Permission permission = new Permission();
+LinkedList<String> rolesList = new LinkedList<String>();
+rolesList.add("read");
+permission.roles = rolesList;
+
+graphClient.sites("{sitesId}").permissions("{permissionId}")
+ .buildRequest()
+ .patch(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/user-list-teamsapps-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/java/user-list-teamsapps-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-UserScopeTeamsAppInstallation userScopeTeamsAppInstallation = graphClient.users("{id}").teamwork().installedApps("{id}")
+IUserScopeTeamsAppInstallationCollectionPage installedApps = graphClient.users("{id}").teamwork().installedApps()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/cloudpconpremisesconnection-runhealthcheck-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/cloudpconpremisesconnection-runhealthcheck-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/deviceManagement/virtualEndpoint/cloudPCs/{id}/reprovision')
+let res = await client.api('/deviceManagement/virtualEndpoint/onPremisesConnections/{id}/runHealthChecks')
.version('beta') .post();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-javascript-snippets.md
@@ -0,0 +1,30 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const accessPackageResourceRequest = {
+ catalogId: "de9315c1-272b-4905-924b-cc112ca180c7",
+ accessPackageResource: {
+ displayName: "Community Outreach",
+ description: "https://contoso.sharepoint.com/sites/CSR",
+ resourceType: "SharePoint Online Site",
+ originId: "https://contoso.sharepoint.com/sites/CSR",
+ originSystem: "SharePointOnline",
+ accessPackageResourceEnvironment@odata.bind: "accessPackageResourceEnvironments/615f2218-678f-471f-a60a-02c2f4f80c57"
+ },
+ requestType: "AdminAdd"
+};
+
+let res = await client.api('/identityGovernance/entitlementManagement/accessPackageResourceRequests')
+ .version('beta')
+ .post(accessPackageResourceRequest);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-javascript-snippets.md
@@ -0,0 +1,32 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const accessPackageResourceRequest = {
+ catalogId: "de9315c1-272b-4905-924b-cc112ca180c7",
+ accessPackageResource: {
+ displayName: "Community Outreach",
+ description: "https://contoso.sharepoint.com/sites/CSR",
+ resourceType: "SharePoint Online Site",
+ originId: "https://contoso.sharepoint.com/sites/CSR",
+ originSystem: "SharePointOnline",
+ accessPackageResourceEnvironment: {
+ originId: "https://contoso-admin.sharepoint.com/"
+ }
+ },
+ requestType: "AdminAdd"
+};
+
+let res = await client.api('/identityGovernance/entitlementManagement/accessPackageResourceRequests')
+ .version('beta')
+ .post(accessPackageResourceRequest);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-chatmessage-from-channel-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-chatmessage-from-channel-javascript-snippets.md
@@ -11,28 +11,9 @@ const options = {
const client = Client.init(options); const chatMessage = {
- subject: null,
- body: {
- contentType: "html",
- content: "<attachment id=\"74d20c7f34aa4a7fb74e2b30004247c5\"></attachment>"
- },
- attachments: [{
- id: "74d20c7f34aa4a7fb74e2b30004247c5",
- contentType: "application/vnd.microsoft.card.adaptive",
- contentUrl: null,
- content: {\r\n \"$schema\: \http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"type\: \AdaptiveCard\",\r\n \"version\: \1.2\",\r\n \"speak\: \The Seattle Seahawks beat the Carolina Panthers 40-7\",\r\n \"body\: [\r\n {\r\n \type\: \Container\",\r\n \"items\: [\r\n {\r\n \type\: \ColumnSet\",\r\n \"columns\: [\r\n {\r\n \type\: \Column\",\r\n \"width\: \auto\",\r\n \"items\: [\r\n {\r\n \type\: \Image\",\r\n \"url\: \../hostedContents/1/$value\",\r\n \"size\: \Medium\"\r\n },\r\n {\r\n \"type\: \TextBlock\",\r\n \"text\: \SHADES\",\r\n \"horizontalAlignment\: \Center\",\r\n \"weight\: \Bolder\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\: \Column\",\r\n \"width\: \stretch\",\r\n \"separator\: true,\r\n \spacing\: \Medium\",\r\n \"items\: [\r\n {\r\n \type\: \TextBlock\",\r\n \"text\: \2019-08-31T19:30:00Z\",\r\n \"horizontalAlignment\: \Center\"\r\n },\r\n {\r\n \"type\: \TextBlock\",\r\n \"text\: \Final\",\r\n \"spacing\: \None\",\r\n \"horizontalAlignment\: \Center\"\r\n },\r\n {\r\n \"type\: \TextBlock\",\r\n \"text\: \40 - 7\",\r\n \"size\: \ExtraLarge\",\r\n \"horizontalAlignment\: \Center\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\: \Column\",\r\n \"width\: \auto\",\r\n \"separator\: true,\r\n \spacing\: \Medium\",\r\n \"items\: [\r\n {\r\n \type\: \Image\",\r\n \"url\: \../hostedContents/2/$value\",\r\n \"size\: \Medium\",\r\n \"horizontalAlignment\: \Center\"\r\n },\r\n {\r\n \"type\: \TextBlock\",\r\n \"text\: \SKINS\",\r\n \"horizontalAlignment\: \Center\",\r\n \"weight\: \"Bolder\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}",
- name: null,
- thumbnailUrl: null
- }],
- hostedContents: [{
- @microsoft.graph.temporaryId: "1",
- contentBytes: "iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaK6UvXb169ToGNuA0Cp+oYVHlxsYGK2QVEFqnT5/eej8/+9nPtr73LwjvFZPxeK84GsMpJHueEniGFJ7785///Ox73/vell/84hcUaoSff/WrX92aOMeCz64UVo389eTJk//1ne98Z/OnP/3p22+99dZ7NlZpaORGw6Ure0Kk72GD73/vfFU0BjQ6KT5lI8UsRjiS6vNFpFibhecoKaBTh9QXv/jF2Y9+9KPZr371K1qDJkqs09jhL14cPLzxxhtudzhogoZNW/ZEe4zLYSECC4ViRRwCghODxWOFOsIO4YzOwV47lxQhdf/9928dCfUJ8GXwnDgiHbpOU4Ijfzu6+pDtD280dJqyJ0A4ud3sahE65pBhhXDKdUEyAnDIQdgnpBBOL774In1fqQ1dp6lBnXONgUU0fNaxB2KuCad09Ek94bA/53wOdgwGAtsWbxiEQwRz15DCkZPHEeY6eE0cgbL3IumhT7L94IWG0Cr2oGNm0HNUwCmX99+gmP/wOF1pC6e8Oefn2obUww8/3Gu+KRX8BVb6POZY4C8Ftg880CBi7JezrzRdx7NT5twJTeBoARP1bFtTaxNSJ0+epNs7lKGOPqco5aVjq9BAitkvIqCyrzRtAp0y9Sc+Q5x3N5VjADYNqVxzT13gFJ29N0kHZzI5Tu9pKC2yX8JSeJfveE8pxeBF0XP97dAHQpRtfypNQqrkgAq86yR55qdoMAX2C5ggH3z+qam+p0OY+2HPWyLPAbgupGoIqEBB5c/7aIqGE9gPiz3FW6bPqV/Jp3jLeJ36rQqpmgIq0KmfL3yIxeqeyCkaUGA/zLL+KTUEVdtP/YZaYpCCx3KMZSFV2iR5G7k+dJgi9EFW8wRwkLRrWUANdsVzCjhtY8VkHAucRZdQXoeFFJYZsNevBeqk5Ql+WM17wjTT1l1EWUBluW+xtyaL+zC4S1gH1VebUG6ChVQJ66D6Sl0nucVhHG3fnYGFVFXzUMs0+ZvT+Vw6q5SnM3FIYSU5e80aaWW6j8QfOp1azKQ4oHAHA/agKq36ZAcBxh5TK/xNlvK0LwQUrsVD4LPXrJHH6bEkDakdN+NbDCh8mlfNcoOmlk0s1/hp3jqpPsX68pe/vB1SNX6at44+7UsvUUjRu4Vu/4f9wqiOogIszowLOrajqABHCfF77eIHP/jB9lEUe53a6WgqPVbnlpbeznj7P+yXil9V3lU8NzXGo6ig79qpb3zjG9shdfbsWfoaY6C5qXSwNpHVuIWV91vf+of9Eu4LxR48CouH9/gbdExzLDFcdL3Ygdp64YUXtkNqzHXCHB57/9Jez4vxb5skZ7b+Yb9Y1N0NUlvskDmuNRpan/VAf/rTn7ZCCrf8Zc89JroVcRr4i5HVdw3Mf9MvgYht/WP+APZEoxE6ZA0XEPfV9VQGyxjwByE1xgnzmCbQ++u4GBrLnBp/3TsCahSLN9cJA3fMpzAB+7Cgibffftv6xEchNYZFruv0PTWWTp/q4VujWn2DMkIKd9pkTzYqGLgJJviq0OVTPsxFhT8XLlygzztGrBbSTMu5KBw97bHuRYNoldHPRwU4MpjCfFTQZr4Fn+gt/nn11Vfpc46RxwXaU4D+1fCsBFNJx6xb0QBqAiFV5d0Ouqj5bgdtNb1MBgH14YcfWl+49ec3v/kNfc4x0lKE9hoGFMIJNypodWrHIKTYC4xSx08hqtRkUhhBFgcU/rzxxhv0OcdIk+ft4Mjzj3/84/+xWs5hvSUWhvcOp0AhNVKrBt9TTz01e+WVV2z/8z/vvPMOfc4x0p07m8H6whVnIjhqwrRR40/s2lBIjRTu8BB3NIQTJsjff/992/fL/0wppHT7ltUQTpjL/cMf/vC3qHaYCMcndZ0mw9uYVEhdvXqVto8RAhmnc4Cjpt/97ne2v5v9UUhNExYB43QOfvzjH7//+uuvv2undn+x/vCa1QqBhJUA7qF0u9nH/h+sBaOnOz4IxQAAAABJRU5ErkJggg==",
- contentType: "image/png"
- }, {
- @microsoft.graph.temporaryId: "2",
- contentBytes: "iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEar6WzSnk5E4cUVpKz16yRVqb7SPym08nFTIoDCncwYA+q0qp3dhBg7DG1wt9kKS/7QkDhs3gIfPaaNfK4PJakIbXrZnyLAYV386pZbtDUsonlGt/NWyfVu1hPPfXUTkjV+G7eOnq3L71EIUXvFrrzH/YLozqLCrA4My7o2M6iApwlxPvaxSuvvLJzFsVep3Y6m0qP1bmlpbcz3vkP+6XiV5V3Fc9NjfEsKui7duq5557bCakzZ87Q1xgDzU2lg7WJrMYtrLzf+vY/7JdwXyj24FFYPL3H36BjmmOJ4UPXix2orbfeemsnpMZcJ8zhsf2X9np+GP9Hk+TM9j/sF4u6u0Fqix0yx2eNhtZnPdBXX321HVK45S977jHRrYjTwF+MrL5rYP6bfglEbPsf8wewJxqN0CFr+ABxX10vZbCMAX8QUmOcMI9pAr2/jouhscyp8de9I6BGsXhznTBwx3wJE7A3C5r4/PPPrU/8EFJjWOS6Tt9LY+n0rh6+NarVNygjpHCnTfZko4KBm2CCrwpd3uXDXFT4c+7cOfq8Y8RqIc20nIvC2dN+6140iFYZ/XxUgDODKcxHBW3mW/CO3uKf9957jz7nGHl8QHsK0L8aXpVgKmnTuhUNoCYQUlXe7aCLmu920FbTj8kgoL7//nvrC9f//OlPf6LPOUZaitBew4BCOOFGBa0u7RiEFHuBUer4LkSVmkwKI8jigMKfTz75hD7nGGnyvB2cef71r3/9P1bLOay3xMLw3uEUKKRGatXge/LJJ2fvvvuuHX/+54svvqDPOUa6c2czWF+44koEZ02YNmr8jl0bCqmRwh0e4o6GcMIE+bfffmvHfvmfKYWUbt+yGsIJc7mfffbZf0e1w0Q43qnrNBnexqRC6uOPP6btY4RAxuUc4Kzpo48+suPd7I9CapqwCBiXc/DGG298+8EHH/yXXdr9zfrDv1utEEhYCeAeSj82+8n/A1GsifSVBvjAAAAAAElFTkSuQmCC",
- contentType: "image/png"
- }]
+ body: {
+ content: "Hello World"
+ }
}; let res = await client.api('/teams/{id}/channels/{id}/messages')
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-directoryobject-from-device-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-directoryobject-from-device-javascript-snippets.md
@@ -14,7 +14,7 @@ const directoryObject = {
@odata.id: "https://graph.microsoft.com/beta/directoryObjects/{id}" };
-let res = await client.api('/devices/{id}/registeredOwners/$ref')
+let res = await client.api('/devices/{id}/registeredUsers/$ref')
.version('beta') .post(directoryObject);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-educationclass-from-educationschool-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-educationclass-from-educationschool-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/schools/10001/users/13006')
+let res = await client.api('/education/classes/{id}/teachers/14012')
.version('beta') .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-event-recurring-daily-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-event-recurring-daily-javascript-snippets.md
@@ -0,0 +1,56 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const event = {
+ subject: "Let's go for lunch",
+ body: {
+ contentType: "HTML",
+ content: "Does noon work for you?"
+ },
+ start: {
+ dateTime: "2020-02-25T12:00:00",
+ timeZone: "Pacific Standard Time"
+ },
+ end: {
+ dateTime: "2020-02-25T14:00:00",
+ timeZone: "Pacific Standard Time"
+ },
+ location:{
+ displayName:"Harry's Bar"
+ },
+ attendees: [
+ {
+ emailAddress: {
+ address:"AlexW@contoso.OnMicrosoft.com",
+ name: "Alex Wilbur"
+ },
+ type: "required"
+ }
+ ],
+ recurrence: {
+ pattern: {
+ type: "daily",
+ interval: 1
+ },
+ range: {
+ type: "numbered",
+ startDate: "2020-02-25",
+ numberOfOccurrences: 2
+ }
+ }
+};
+
+let res = await client.api('/me/events')
+ .version('beta')
+ .post(event);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-identityuserflowattributeassignment-from--javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-identityuserflowattributeassignment-from--javascript-snippets.md
@@ -21,7 +21,7 @@ const identityUserFlowAttributeAssignment = {
} };
-let res = await client.api('/identity/b2cUserFlows/B2C_1_Consumer/userAttributeAssignments')
+let res = await client.api('/identity/b2xUserFlows/B2X_1_Partner/userAttributeAssignments')
.version('beta') .post(identityUserFlowAttributeAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-item-attachment-from-event-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-item-attachment-from-event-javascript-snippets.md
@@ -0,0 +1,38 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const attachment = {
+ @odata.type: "#microsoft.graph.itemAttachment",
+ name: "Holiday event",
+ item: {
+ @odata.type: "microsoft.graph.event",
+ subject: "Discuss gifts for children",
+ body: {
+ contentType: "HTML",
+ content: "Let's look for funding!"
+ },
+ start: {
+ dateTime: "2016-12-02T18:00:00",
+ timeZone: "Pacific Standard Time"
+ },
+ end: {
+ dateTime: "2016-12-02T19:00:00",
+ timeZone: "Pacific Standard Time"
+ }
+ }
+};
+
+let res = await client.api('/me/events/{AAMkAGI1AAAt9AHjAAA=}/attachments')
+ .version('beta')
+ .post(attachment);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-item-attachment-from-message-beta-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-item-attachment-from-message-beta-javascript-snippets.md
@@ -0,0 +1,38 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const attachment = {
+ @odata.type: "#microsoft.graph.itemAttachment",
+ name: "Holiday event",
+ item: {
+ @odata.type: "microsoft.graph.event",
+ subject: "Discuss gifts for children",
+ body: {
+ contentType: "HTML",
+ content: "Let's look for funding!"
+ },
+ start: {
+ dateTime: "2016-12-02T18:00:00",
+ timeZone: "Pacific Standard Time"
+ },
+ end: {
+ dateTime: "2016-12-02T19:00:00",
+ timeZone: "Pacific Standard Time"
+ }
+ }
+};
+
+let res = await client.api('/me/messages/AAMkpsDRVK/attachments')
+ .version('beta')
+ .post(attachment);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-item-attachment-with-post-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-item-attachment-with-post-javascript-snippets.md
@@ -0,0 +1,46 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const reply = {
+ post: {
+ body: {
+ contentType: "text",
+ content: "I attached an event."
+ },
+ attachments: [{
+ @odata.type: "#microsoft.graph.itemAttachment",
+ name: "Holiday event",
+ item: {
+ @odata.type: "microsoft.graph.event",
+ subject: "Discuss gifts for children",
+ body: {
+ contentType: "HTML",
+ content: "Let's look for funding!"
+ },
+ start: {
+ dateTime: "2019-12-02T18:00:00",
+ timeZone: "Pacific Standard Time"
+ },
+ end: {
+ dateTime: "2019-12-02T19:00:00",
+ timeZone: "Pacific Standard Time"
+ }
+ }
+ } ]
+ }
+};
+
+let res = await client.api('/groups/1848753d-185d-4c08-a4e4-6ee40521d115/threads/AAQkADJUdfolA==/reply')
+ .version('beta')
+ .post(reply);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-listitem-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-listitem-javascript-snippets.md
@@ -10,16 +10,13 @@ const options = {
const client = Client.init(options);
-const listItem = {
- fields: {
- Title: "Widget",
- Color: "Purple",
- Weight: 32
- }
+const fieldValueSet = {
+ Color: "Fuchsia",
+ Quantity: 934
};
-let res = await client.api('/sites/{site-id}/lists/{list-id}/items')
+let res = await client.api('/sites/{site-id}/lists/{list-id}/items/{item-id}/fields')
.version('beta')
- .post(listItem);
+ .update(fieldValueSet);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-permission-from--javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-permission-from--javascript-snippets.md
@@ -0,0 +1,27 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const permission = {
+ roles: ["write"],
+ grantedToIdentities: [{
+ application: {
+ id: "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
+ displayName: "Foo App"
+ }
+ }]
+};
+
+let res = await client.api('/sites/{sitesId}/permissions')
+ .version('beta')
+ .post(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-trustframeworkkeyset-from-trustframework1-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/create-trustframeworkkeyset-from-trustframework1-javascript-snippets.md
@@ -0,0 +1,21 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const trustFrameworkKeySet = {
+ id: "keyset1"
+};
+
+let res = await client.api('/trustFramework/keySets')
+ .version('beta')
+ .post(trustFrameworkKeySet);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/delete-b2xuserflows-identityproviders-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/delete-b2xuserflows-identityproviders-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/identity/b2xUserFlows/B2X_1_PartnerSignUp/identityProviders/Facebook-OAUTH/$ref')
+let res = await client.api('/identity/b2cUserFlows/B2C_1_CustomerSignUp/identityProviders/Facebook-OAUTH/$ref')
.version('beta') .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/delete-educationassignment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/delete-educationassignment-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/classes/11014/assignments/19002')
+let res = await client.api('/education/classes/11014/assignmentCategories/19002')
.version('beta') .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/delete-permission-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/delete-permission-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/drive/root/items/{item-id}/permissions/{perm-id}')
+let res = await client.api('/sites/{sitesId}/permissions/{permissionId}')
.version('beta') .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/event-delta-events-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/event-delta-events-javascript-snippets.md
@@ -0,0 +1,17 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/me/calendar/events/delta?startDateTime=2020-06-12T00:00:00Z')
+ .version('beta')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-a-count-endswith-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-a-count-endswith-javascript-snippets.md
@@ -13,8 +13,8 @@ const client = Client.init(options);
let res = await client.api('/users') .version('beta') .header('ConsistencyLevel','eventual')
- .filter('endswith(mail,'a@contoso.com'),')
- .orderby('userPrincipalName ')
+ .filter('endswith(mail,'a@contoso.com')')
+ .orderby('userPrincipalName')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-accesspackageresourceenvironment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-accesspackageresourceenvironment-javascript-snippets.md
@@ -0,0 +1,17 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/identityGovernance/entitlementManagement/accessPackageResourceEnvironments/{accessPackageResourceEnvironmentId}')
+ .version('beta')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-accesspackageresourceroles-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-accesspackageresourceroles-javascript-snippets.md
@@ -12,7 +12,7 @@ const client = Client.init(options);
let res = await client.api('/identityGovernance/entitlementManagement/accessPackageCatalogs/15d889df-3eb8-4e9b-bfb4-b1908849aec4/accessPackageResourceRoles') .version('beta')
- .filter('(originSystem eq 'AadGroup' and accessPackageResource/id eq 'a35bef72-a8aa-4ca3-af30-f6b2ece7208f'),')
+ .filter('(originSystem eq 'AadGroup' and accessPackageResource/id eq 'a35bef72-a8aa-4ca3-af30-f6b2ece7208f')')
.expand('accessPackageResource/id%20eq%20'a35bef72-a8aa-4ca3-af30-f6b2ece7208f')') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-accessreviews-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-accessreviews-javascript-snippets.md
@@ -12,7 +12,7 @@ const client = Client.init(options);
let res = await client.api('/accessReviews') .version('beta')
- .filter('businessFlowTemplateId eq '6e4f3d20-c5c3-407f-9695-8460952bcc68',')
+ .filter('businessFlowTemplateId eq '6e4f3d20-c5c3-407f-9695-8460952bcc68'')
.skip(0) .top(100) .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-bitlockerrecoverykey-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-bitlockerrecoverykey-javascript-snippets.md
@@ -10,11 +10,9 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/bitlocker/recoveryKeys')
+let res = await client.api('/bitlocker/recoveryKeys/b465e4e8-e4e8-b465-e8e4-65b4e8e465b4')
.version('beta')
- .header('ocp-client-name','"My Friendly Client"')
- .header('ocp-client-version','"1.2"')
- .filter('deviceId eq '1ab40ab2-32a8-4b00-b6b5-ba724e407de9'')
+ .select('key')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-buckets-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-buckets-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/planner/plans/2txjA-BMZEq-bKi6Wfj5aGQAB1OJ/buckets')
+let res = await client.api('/planner/buckets')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-classes-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-classes-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/classes')
+let res = await client.api('/education/schools/10002/classes')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-cloudpconpremisesconnection-withdetails-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-cloudpconpremisesconnection-withdetails-javascript-snippets.md
@@ -12,7 +12,7 @@ const client = Client.init(options);
let res = await client.api('/deviceManagement/virtualEndpoint/onPremisesConnections/{id}') .version('beta')
- .select('id,displayName,subscriptionId,subscriptionName,adDomainName,adDomainUsername,organizationalUnit,virtualNetworkId,subnetId,healthCheckStatus,healthCheckStatusDetails,inUse')
+ .select('id,displayName,healthCheckStatus,healthCheckStatusDetails,inUse')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-connectors-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-connectors-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/onPremisesPublishingProfiles/applicationProxy/connectors')
+let res = await client.api('/print/connectors')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-contract-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-contract-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/contracts/{id}')
+let res = await client.api('/contracts')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-custodian-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-custodian-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/compliance/ediscovery/cases/2192ca408ea2410eba3bec8ae873be6b/custodians')
+let res = await client.api('/compliance/ediscovery/cases/2192ca408ea2410eba3bec8ae873be6b/custodians/45454331323337443946343043464239')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-educationuser-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-educationuser-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/users/13012')
+let res = await client.api('/education/me/user')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-emailauthenticationmethod-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-emailauthenticationmethod-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/authentication/emailMethods/3ddfcfc8-9383-446f-83cc-3ab9be4be18f')
+let res = await client.api('/me/authentication/emailMethods')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-endpoints-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-endpoints-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/print/reports/dailyPrintUsageSummariesByPrinter')
+let res = await client.api('/groups/{id}/endpoints')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-group-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-group-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/termStore/groups')
+let res = await client.api('/groups/45b7d2e7-b882-4a80-ba97-10b7a63b8fa4')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-grouplifecyclepolicy-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-grouplifecyclepolicy-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/groupLifecyclePolicies')
+let res = await client.api('/groupLifecyclePolicies/{id}')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-identityprovider-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-identityprovider-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/identityProviders/{id}')
+let res = await client.api('/identityProviders')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-itemphone-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-itemphone-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/profile/phones')
+let res = await client.api('/me/profile/phones/{id}')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-jobs-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-jobs-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/print/printers/{id}/jobs')
+let res = await client.api('/servicePrincipals/{id}/synchronization/jobs/')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-messages-with-mentions-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-messages-with-mentions-javascript-snippets.md
@@ -12,7 +12,7 @@ const client = Client.init(options);
let res = await client.api('/me/messages') .version('beta')
- .filter('MentionsPreview/IsMentioned eq true,')
+ .filter('MentionsPreview/IsMentioned eq true')
.select('subject,sender,receivedDateTime,mentionsPreview') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-names-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-names-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/drive/items/{id}/workbook/names')
+let res = await client.api('/me/profile/names')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-opentypeextension-3-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-opentypeextension-3-javascript-snippets.md
@@ -12,7 +12,6 @@ const client = Client.init(options);
let res = await client.api('/me/messages/AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===/') .version('beta')
- .filter('id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')')
.expand('extensions($filter=id%20eq%20'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-passwordlessmicrosoftauthenticatorauthenticationmethod-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-passwordlessmicrosoftauthenticatorauthenticationmethod-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/authentication/passwordlessMicrosoftAuthenticatorMethods/R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1')
+let res = await client.api('/me/authentication/passwordlessMicrosoftAuthenticatorMethods')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-permission-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-permission-javascript-snippets.md
@@ -0,0 +1,17 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/sites/{sitesId}/permissions/{permissionId}')
+ .version('beta')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-plans-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-plans-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/planner/plans')
+let res = await client.api('/me/planner/plans')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-printjob-withtasks-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-printjob-withtasks-javascript-snippets.md
@@ -0,0 +1,18 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/print/printers/c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb/jobs/5182')
+ .version('beta')
+ .expand('tasks')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-privilegedapproval-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-privilegedapproval-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/privilegedApproval/{id}')
+let res = await client.api('/privilegedApproval')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-replies-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-replies-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/drive/items/{id}/workbook/comments/{id}/replies')
+let res = await client.api('/chats/{id}/messages/{id}/replies')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-roleassignments-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-roleassignments-javascript-snippets.md
@@ -12,7 +12,6 @@ const client = Client.init(options);
let res = await client.api('/roleManagement/directory/roleAssignments') .version('beta')
- .filter(' principalId eq 'f1847572-48aa-47aa-96a3-2ec61904f41f'')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-settings-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-settings-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/analytics/settings')
+let res = await client.api('/settings')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-signin-last-time-filter-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-signin-last-time-filter-javascript-snippets.md
@@ -12,7 +12,7 @@ const client = Client.init(options);
let res = await client.api('/users') .version('beta')
- .filter('startswith(displayName,'Eric'),')
+ .filter('startswith(displayName,'Eric')')
.select('displayName,signInActivity') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-singlevaluelegacyextendedproperty-1-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-singlevaluelegacyextendedproperty-1-javascript-snippets.md
@@ -12,7 +12,6 @@ const client = Client.init(options);
let res = await client.api('/me/messages/AAMkAGE1M2_bs88AACHsLqWAAA=/') .version('beta')
- .filter('id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color')')
.expand('singleValueExtendedProperties($filter=id%20eq%20'String%20%7B66f5a359-4659-4830-9070-00047ec6ac6e%7D%20Name%20Color')') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-swapshiftschangerequest-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-swapshiftschangerequest-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/teams/{teamId}/schedule/swapShiftsChangeRequests/{swapShiftsChangeRequestId}')
+let res = await client.api('/teams/{teamId}/schedule/swapShiftsChangeRequests')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-synchronizationschema-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-synchronizationschema-javascript-snippets.md
@@ -10,8 +10,9 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/servicePrincipals/{id}/synchronization/jobs/{jobId}/schema')
+let res = await client.api('/servicePrincipals/{servicePrincipalId}/synchronization/jobs/{jobId}/schema')
.version('beta')
+ .header('Authorization','Bearer {Token}')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-term-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-term-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/termStore/groups/{groupId}/sets/{setId}/terms/{termId}')
+let res = await client.api('/termStore/sets/{setId}/children')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-todotask-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-todotask-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/todo/lists/AAMkADA1MTHgwAAA=/tasks/721a35e2-35e2-721a-e235-1a72e2351a72')
+let res = await client.api('/me/todo/lists/35e2-35e2-721a-e235-1a72e2351a7/tasks')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-todotasklist-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-todotasklist-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/todo/lists')
+let res = await client.api('/me/todo/lists/AAMkADIyAAAAABrJAAA=')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-unifiedgroupsource-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-unifiedgroupsource-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/unifiedGroupSources')
+let res = await client.api('/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/unifiedGroupSources/33434233-3030-3739-3043-393039324633')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-unifiedroleassignment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-unifiedroleassignment-javascript-snippets.md
@@ -10,9 +10,9 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/roleManagement/directory/roleAssignments/lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1')
+let res = await client.api('/roleManagement/deviceManagement/roleAssignments/lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1')
.version('beta')
- .expand('directoryScope')
+ .expand('directoryScopes')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-unifiedroleassignmentmultiple-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-unifiedroleassignmentmultiple-javascript-snippets.md
@@ -12,7 +12,6 @@ const client = Client.init(options);
let res = await client.api('/roleManagement/deviceManagement/roleAssignments') .version('beta')
- .filter(' principalIds/any(x:x eq '564ae70c-73d9-476b-820b-fb61eb7384b9')')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-userflowlanguagepage-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-userflowlanguagepage-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/identity/b2cUserFlows/B2C_1_Customer/languages/en/defaultPages/idpselections/$value')
+let res = await client.api('/identity/b2cUserFlows/B2C_1_Customer/languages/en/defaultPages')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-usersource-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/get-usersource-javascript-snippets.md
@@ -0,0 +1,17 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources')
+ .version('beta')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/group-create-approleassignment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/group-create-approleassignment-javascript-snippets.md
@@ -16,7 +16,7 @@ const appRoleAssignment = {
appRoleId: "appRoleId-value" };
-let res = await client.api('/servicePrincipals/{id}/appRoleAssignments')
+let res = await client.api('/groups/{id}/appRoleAssignments')
.version('beta') .post(appRoleAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/list-accesspackageresourceenvironment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/list-accesspackageresourceenvironment-javascript-snippets.md
@@ -0,0 +1,18 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/identityGovernance/entitlementManagement/accessPackageResourceEnvironments')
+ .version('beta')
+ .filter('originSystem eq 'SharePointOnline'')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/list-permission-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/list-permission-javascript-snippets.md
@@ -0,0 +1,17 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/sites/{sitesId}/permissions')
+ .version('beta')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/list-teamsapp-with-filter-expand-appdefinitions-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/list-teamsapp-with-filter-expand-appdefinitions-javascript-snippets.md
@@ -12,7 +12,7 @@ const client = Client.init(options);
let res = await client.api('/appCatalogs/teamsApps') .version('beta')
- .filter('id eq '876df28f-2e78-423b-94a5-44181bd0e225',')
+ .filter('id eq '876df28f-2e78-423b-94a5-44181bd0e225'')
.expand('appDefinitions') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/list-usageright-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/list-usageright-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/users/{userId}/usageRights')
+let res = await client.api('/devices/{objectId}/usageRights')
.version('beta') .filter('state in ('active', 'suspended') and serviceIdentifier in ('ABCD')') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/sendreminder-accessreview-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/sendreminder-accessreview-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/accessReviews/2975E9B5-44CE-4E71-93D3-30F03B5AA992/sendReminder')
+let res = await client.api('/identityGovernance/accessReviews/definitions/04e5c3b2-9db2-40d3-a204-128f4956ae8e/instances/70463350-742e-4909-bfa5-bc23447bd002/sendReminder')
.version('beta') .post();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/shift-get-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/shift-get-javascript-snippets.md
@@ -10,8 +10,29 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/users/871dbd5c-3a6a-4392-bfe1-042452793a50/shiftPreferences')
+const shiftPreferences = {
+ id: "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7",
+ @odata.etag: "1a371e53-f0a6-4327-a1ee-e3c56e4b38aa",
+ availability: [
+ {
+ recurrence: {
+ pattern: {
+ type: "Weekly",
+ daysOfWeek: ["Monday", "Wednesday", "Friday"],
+ interval: 1
+ },
+ range: {
+ type: "noEnd"
+ }
+ },
+ timeZone: "Pacific Standard Time",
+ timeSlots: null
+ }
+ ]
+};
+
+let res = await client.api('/users/871dbd5c-3a6a-4392-bfe1-042452793a50/settings/shiftPreferences')
.version('beta')
- .get();
+ .put(shiftPreferences);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/update-authzpolicy-guestuserlevel-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/update-authzpolicy-guestuserlevel-javascript-snippets.md
@@ -0,0 +1,21 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const authorizationPolicy = {
+ guestUserRole:"2af84b1e-32c8-42b7-82bc-daa82404023b"
+};
+
+let res = await client.api('/policies/authorizationPolicy/authorizationPolicy')
+ .version('beta')
+ .update(authorizationPolicy);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/update-organizationalbrandingproperties-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/update-organizationalbrandingproperties-javascript-snippets.md
@@ -10,13 +10,12 @@ const options = {
const client = Client.init(options);
-const organizationalBrandingLocalization = {
- backgroundColor:"#00000F",
- signInPageText: "fr"
+const organizationalBranding = {
+ backgroundColor:"#FFFF33"
};
-let res = await client.api('/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr')
+let res = await client.api('/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding')
.version('beta')
- .put(organizationalBrandingLocalization);
+ .put(organizationalBranding);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/update-permission-from--javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/update-permission-from--javascript-snippets.md
@@ -0,0 +1,21 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const permission = {
+ roles: ["read"]
+};
+
+let res = await client.api('/sites/{sitesId}/permissions/{permissionId}')
+ .version('beta')
+ .update(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/user-list-teamsapps-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/javascript/user-list-teamsapps-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/users/{id}/teamwork/installedApps/{id}')
+let res = await client.api('/users/{id}/teamwork/installedApps')
.version('beta') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/cloudpconpremisesconnection-runhealthcheck-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/cloudpconpremisesconnection-runhealthcheck-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/deviceManagement/virtualEndpoint/cloudPCs/{id}/reprovision"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/deviceManagement/virtualEndpoint/onPremisesConnections/{id}/runHealthChecks"]]];
[urlRequest setHTTPMethod:@"POST"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-new-objc-snippets.md
@@ -0,0 +1,41 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityGovernance/entitlementManagement/accessPackageResourceRequests"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphAccessPackageResourceRequest *accessPackageResourceRequest = [[MSGraphAccessPackageResourceRequest alloc] init];
+[accessPackageResourceRequest setCatalogId:@"de9315c1-272b-4905-924b-cc112ca180c7"];
+MSGraphAccessPackageResource *accessPackageResource = [[MSGraphAccessPackageResource alloc] init];
+[accessPackageResource setDisplayName:@"Community Outreach"];
+[accessPackageResource setDescription:@"https://contoso.sharepoint.com/sites/CSR"];
+[accessPackageResource setResourceType:@"SharePoint Online Site"];
+[accessPackageResource setOriginId:@"https://contoso.sharepoint.com/sites/CSR"];
+[accessPackageResource setOriginSystem:@"SharePointOnline"];
+MSGraphAccessPackageResourceEnvironment *accessPackageResourceEnvironment = [[MSGraphAccessPackageResourceEnvironment alloc] init];
+[accessPackageResourceEnvironment setOriginId:@"https://contoso-admin.sharepoint.com/"];
+[accessPackageResource setAccessPackageResourceEnvironment:accessPackageResourceEnvironment];
+[accessPackageResourceRequest setAccessPackageResource:accessPackageResource];
+[accessPackageResourceRequest setRequestType:@"AdminAdd"];
+
+NSError *error;
+NSData *accessPackageResourceRequestData = [accessPackageResourceRequest getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:accessPackageResourceRequestData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-accesspackageresourcerequest-from-accesspackageresourcerequests-with-accesspackageresourceenvironment-objc-snippets.md
@@ -0,0 +1,38 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityGovernance/entitlementManagement/accessPackageResourceRequests"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphAccessPackageResourceRequest *accessPackageResourceRequest = [[MSGraphAccessPackageResourceRequest alloc] init];
+[accessPackageResourceRequest setCatalogId:@"de9315c1-272b-4905-924b-cc112ca180c7"];
+MSGraphAccessPackageResource *accessPackageResource = [[MSGraphAccessPackageResource alloc] init];
+[accessPackageResource setDisplayName:@"Community Outreach"];
+[accessPackageResource setDescription:@"https://contoso.sharepoint.com/sites/CSR"];
+[accessPackageResource setResourceType:@"SharePoint Online Site"];
+[accessPackageResource setOriginId:@"https://contoso.sharepoint.com/sites/CSR"];
+[accessPackageResource setOriginSystem:@"SharePointOnline"];
+[accessPackageResourceRequest setAccessPackageResource:accessPackageResource];
+[accessPackageResourceRequest setRequestType:@"AdminAdd"];
+
+NSError *error;
+NSData *accessPackageResourceRequestData = [accessPackageResourceRequest getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:accessPackageResourceRequestData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-chatmessage-from-channel-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-chatmessage-from-channel-objc-snippets.md
@@ -12,33 +12,9 @@ NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URL
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; MSGraphChatMessage *chatMessage = [[MSGraphChatMessage alloc] init];
-[chatMessage setSubject: null];
MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
-[body setContentType: [MSGraphBodyType html]];
-[body setContent:@"<attachment id=\"74d20c7f34aa4a7fb74e2b30004247c5\"></attachment>"];
+[body setContent:@"Hello World"];
[chatMessage setBody:body];
-NSMutableArray *attachmentsList = [[NSMutableArray alloc] init];
-MSGraphChatMessageAttachment *attachments = [[MSGraphChatMessageAttachment alloc] init];
-[attachments setId:@"74d20c7f34aa4a7fb74e2b30004247c5"];
-[attachments setContentType:@"application/vnd.microsoft.card.adaptive"];
-[attachments setContentUrl: null];
-[attachments setContent:@"{\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"type\": \"AdaptiveCard\",\r\n \"version\": \"1.2\",\r\n \"speak\": \"The Seattle Seahawks beat the Carolina Panthers 40-7\",\r\n \"body\": [\r\n {\r\n \"type\": \"Container\",\r\n \"items\": [\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"../hostedContents/1/$value\",\r\n \"size\": \"Medium\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"SHADES\",\r\n \"horizontalAlignment\": \"Center\",\r\n \"weight\": \"Bolder\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"stretch\",\r\n \"separator\": true,\r\n \"spacing\": \"Medium\",\r\n \"items\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"2019-08-31T19:30:00Z\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"Final\",\r\n \"spacing\": \"None\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"40 - 7\",\r\n \"size\": \"ExtraLarge\",\r\n \"horizontalAlignment\": \"Center\"\r\n }\r\n ]\r\n },\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"separator\": true,\r\n \"spacing\": \"Medium\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"../hostedContents/2/$value\",\r\n \"size\": \"Medium\",\r\n \"horizontalAlignment\": \"Center\"\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"SKINS\",\r\n \"horizontalAlignment\": \"Center\",\r\n \"weight\": \"Bolder\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}"];
-[attachments setName: null];
-[attachments setThumbnailUrl: null];
-[attachmentsList addObject: attachments];
-[chatMessage setAttachments:attachmentsList];
-NSMutableArray *hostedContentsList = [[NSMutableArray alloc] init];
-MSGraphChatMessageHostedContent *hostedContents = [[MSGraphChatMessageHostedContent alloc] init];
-[hostedContents set@microsoft.graph.temporaryId:@"1"];
-[hostedContents setContentBytes:@"iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaK6UvXb169ToGNuA0Cp+oYVHlxsYGK2QVEFqnT5/eej8/+9nPtr73LwjvFZPxeK84GsMpJHueEniGFJ7785///Ox73/vell/84hcUaoSff/WrX92aOMeCz64UVo389eTJk//1ne98Z/OnP/3p22+99dZ7NlZpaORGw6Ure0Kk72GD73/vfFU0BjQ6KT5lI8UsRjiS6vNFpFibhecoKaBTh9QXv/jF2Y9+9KPZr371K1qDJkqs09jhL14cPLzxxhtudzhogoZNW/ZEe4zLYSECC4ViRRwCghODxWOFOsIO4YzOwV47lxQhdf/9928dCfUJ8GXwnDgiHbpOU4Ijfzu6+pDtD280dJqyJ0A4ud3sahE65pBhhXDKdUEyAnDIQdgnpBBOL774In1fqQ1dp6lBnXONgUU0fNaxB2KuCad09Ek94bA/53wOdgwGAtsWbxiEQwRz15DCkZPHEeY6eE0cgbL3IumhT7L94IWG0Cr2oGNm0HNUwCmX99+gmP/wOF1pC6e8Oefn2obUww8/3Gu+KRX8BVb6POZY4C8Ftg880CBi7JezrzRdx7NT5twJTeBoARP1bFtTaxNSJ0+epNs7lKGOPqco5aVjq9BAitkvIqCyrzRtAp0y9Sc+Q5x3N5VjADYNqVxzT13gFJ29N0kHZzI5Tu9pKC2yX8JSeJfveE8pxeBF0XP97dAHQpRtfypNQqrkgAq86yR55qdoMAX2C5ggH3z+qam+p0OY+2HPWyLPAbgupGoIqEBB5c/7aIqGE9gPiz3FW6bPqV/Jp3jLeJ36rQqpmgIq0KmfL3yIxeqeyCkaUGA/zLL+KTUEVdtP/YZaYpCCx3KMZSFV2iR5G7k+dJgi9EFW8wRwkLRrWUANdsVzCjhtY8VkHAucRZdQXoeFFJYZsNevBeqk5Ql+WM17wjTT1l1EWUBluW+xtyaL+zC4S1gH1VebUG6ChVQJ66D6Sl0nucVhHG3fnYGFVFXzUMs0+ZvT+Vw6q5SnM3FIYSU5e80aaWW6j8QfOp1azKQ4oHAHA/agKq36ZAcBxh5TK/xNlvK0LwQUrsVD4LPXrJHH6bEkDakdN+NbDCh8mlfNcoOmlk0s1/hp3jqpPsX68pe/vB1SNX6at44+7UsvUUjRu4Vu/4f9wqiOogIszowLOrajqABHCfF77eIHP/jB9lEUe53a6WgqPVbnlpbeznj7P+yXil9V3lU8NzXGo6ig79qpb3zjG9shdfbsWfoaY6C5qXSwNpHVuIWV91vf+of9Eu4LxR48CouH9/gbdExzLDFcdL3Ygdp64YUXtkNqzHXCHB57/9Jez4vxb5skZ7b+Yb9Y1N0NUlvskDmuNRpan/VAf/rTn7ZCCrf8Zc89JroVcRr4i5HVdw3Mf9MvgYht/WP+APZEoxE6ZA0XEPfV9VQGyxjwByE1xgnzmCbQ++u4GBrLnBp/3TsCahSLN9cJA3fMpzAB+7Cgibffftv6xEchNYZFruv0PTWWTp/q4VujWn2DMkIKd9pkTzYqGLgJJviq0OVTPsxFhT8XLlygzztGrBbSTMu5KBw97bHuRYNoldHPRwU4MpjCfFTQZr4Fn+gt/nn11Vfpc46RxwXaU4D+1fCsBFNJx6xb0QBqAiFV5d0Ouqj5bgdtNb1MBgH14YcfWl+49ec3v/kNfc4x0lKE9hoGFMIJNypodWrHIKTYC4xSx08hqtRkUhhBFgcU/rzxxhv0OcdIk+ft4Mjzj3/84/+xWs5hvSUWhvcOp0AhNVKrBt9TTz01e+WVV2z/8z/vvPMOfc4x0p07m8H6whVnIjhqwrRR40/s2lBIjRTu8BB3NIQTJsjff/992/fL/0wppHT7ltUQTpjL/cMf/vC3qHaYCMcndZ0mw9uYVEhdvXqVto8RAhmnc4Cjpt/97ne2v5v9UUhNExYB43QOfvzjH7//+uuvv2undn+x/vCa1QqBhJUA7qF0u9nH/h+sBaOnOz4IxQAAAABJRU5ErkJggg=="];
-[hostedContents setContentType:@"image/png"];
-[hostedContentsList addObject: hostedContents];
-MSGraphChatMessageHostedContent *hostedContents = [[MSGraphChatMessageHostedContent alloc] init];
-[hostedContents set@microsoft.graph.temporaryId:@"2"];
-[hostedContents setContentBytes:@"iVBORw0KGgoAAAANSUhEUgAAASkAAAEpCAYAAADPmdSCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEar6WzSnk5E4cUVpKz16yRVqb7SPym08nFTIoDCncwYA+q0qp3dhBg7DG1wt9kKS/7QkDhs3gIfPaaNfK4PJakIbXrZnyLAYV386pZbtDUsonlGt/NWyfVu1hPPfXUTkjV+G7eOnq3L71EIUXvFrrzH/YLozqLCrA4My7o2M6iApwlxPvaxSuvvLJzFsVep3Y6m0qP1bmlpbcz3vkP+6XiV5V3Fc9NjfEsKui7duq5557bCakzZ87Q1xgDzU2lg7WJrMYtrLzf+vY/7JdwXyj24FFYPL3H36BjmmOJ4UPXix2orbfeemsnpMZcJ8zhsf2X9np+GP9Hk+TM9j/sF4u6u0Fqix0yx2eNhtZnPdBXX321HVK45S977jHRrYjTwF+MrL5rYP6bfglEbPsf8wewJxqN0CFr+ABxX10vZbCMAX8QUmOcMI9pAr2/jouhscyp8de9I6BGsXhznTBwx3wJE7A3C5r4/PPPrU/8EFJjWOS6Tt9LY+n0rh6+NarVNygjpHCnTfZko4KBm2CCrwpd3uXDXFT4c+7cOfq8Y8RqIc20nIvC2dN+6140iFYZ/XxUgDODKcxHBW3mW/CO3uKf9957jz7nGHl8QHsK0L8aXpVgKmnTuhUNoCYQUlXe7aCLmu920FbTj8kgoL7//nvrC9f//OlPf6LPOUZaitBew4BCOOFGBa0u7RiEFHuBUer4LkSVmkwKI8jigMKfTz75hD7nGGnyvB2cef71r3/9P1bLOay3xMLw3uEUKKRGatXge/LJJ2fvvvuuHX/+54svvqDPOUa6c2czWF+44koEZ02YNmr8jl0bCqmRwh0e4o6GcMIE+bfffmvHfvmfKYWUbt+yGsIJc7mfffbZf0e1w0Q43qnrNBnexqRC6uOPP6btY4RAxuUc4Kzpo48+suPd7I9CapqwCBiXc/DGG298+8EHH/yXXdr9zfrDv1utEEhYCeAeSj82+8n/A1GsifSVBvjAAAAAAElFTkSuQmCC"];
-[hostedContents setContentType:@"image/png"];
-[hostedContentsList addObject: hostedContents];
-[chatMessage setHostedContents:hostedContentsList];
NSError *error; NSData *chatMessageData = [chatMessage getSerializedDataWithError:&error];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-directoryobject-from-device-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-directoryobject-from-device-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/devices/{id}/registeredOwners/$ref"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/devices/{id}/registeredUsers/$ref"]]];
[urlRequest setHTTPMethod:@"POST"]; [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-educationclass-from-educationschool-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-educationclass-from-educationschool-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/schools/10001/users/13006"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/classes/{id}/teachers/14012"]]];
[urlRequest setHTTPMethod:@"DELETE"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-event-recurring-daily-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-event-recurring-daily-objc-snippets.md
@@ -0,0 +1,66 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/events"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"outlook.timezone=\"Pacific Standard Time\"" forHTTPHeaderField:@"Prefer"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphEvent *event = [[MSGraphEvent alloc] init];
+[event setSubject:@"Let's go for lunch"];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType html]];
+[body setContent:@"Does noon work for you?"];
+[event setBody:body];
+MSGraphDateTimeTimeZone *start = [[MSGraphDateTimeTimeZone alloc] init];
+[start setDateTime: "2020-02-25T12:00:00"];
+[start setTimeZone:@"Pacific Standard Time"];
+[event setStart:start];
+MSGraphDateTimeTimeZone *end = [[MSGraphDateTimeTimeZone alloc] init];
+[end setDateTime: "2020-02-25T14:00:00"];
+[end setTimeZone:@"Pacific Standard Time"];
+[event setEnd:end];
+MSGraphLocation *location = [[MSGraphLocation alloc] init];
+[location setDisplayName:@"Harry's Bar"];
+[event setLocation:location];
+NSMutableArray *attendeesList = [[NSMutableArray alloc] init];
+MSGraphAttendee *attendees = [[MSGraphAttendee alloc] init];
+MSGraphEmailAddress *emailAddress = [[MSGraphEmailAddress alloc] init];
+[emailAddress setAddress:@"AlexW@contoso.OnMicrosoft.com"];
+[emailAddress setName:@"Alex Wilbur"];
+[attendees setEmailAddress:emailAddress];
+[attendees setType: [MSGraphAttendeeType required]];
+[attendeesList addObject: attendees];
+[event setAttendees:attendeesList];
+MSGraphPatternedRecurrence *recurrence = [[MSGraphPatternedRecurrence alloc] init];
+MSGraphRecurrencePattern *pattern = [[MSGraphRecurrencePattern alloc] init];
+[pattern setType: [MSGraphRecurrencePatternType daily]];
+[pattern setInterval: 1];
+[recurrence setPattern:pattern];
+MSGraphRecurrenceRange *range = [[MSGraphRecurrenceRange alloc] init];
+[range setType: [MSGraphRecurrenceRangeType numbered]];
+[range setStartDate:@"2020-02-25"];
+[range setNumberOfOccurrences: 2];
+[recurrence setRange:range];
+[event setRecurrence:recurrence];
+
+NSError *error;
+NSData *eventData = [event getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:eventData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-identityuserflowattributeassignment-from--objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-identityuserflowattributeassignment-from--objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2cUserFlows/B2C_1_Consumer/userAttributeAssignments"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2xUserFlows/B2X_1_Partner/userAttributeAssignments"]]];
[urlRequest setHTTPMethod:@"POST"]; [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-item-attachment-from-event-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-item-attachment-from-event-objc-snippets.md
@@ -0,0 +1,45 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/events/{AAMkAGI1AAAt9AHjAAA=}/attachments"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphAttachment *attachment = [[MSGraphAttachment alloc] init];
+[attachment setName:@"Holiday event"];
+MSGraphOutlookItem *item = [[MSGraphOutlookItem alloc] init];
+[item setSubject:@"Discuss gifts for children"];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType html]];
+[body setContent:@"Let's look for funding!"];
+[item setBody:body];
+MSGraphDateTimeTimeZone *start = [[MSGraphDateTimeTimeZone alloc] init];
+[start setDateTime: "2016-12-02T18:00:00"];
+[start setTimeZone:@"Pacific Standard Time"];
+[item setStart:start];
+MSGraphDateTimeTimeZone *end = [[MSGraphDateTimeTimeZone alloc] init];
+[end setDateTime: "2016-12-02T19:00:00"];
+[end setTimeZone:@"Pacific Standard Time"];
+[item setEnd:end];
+[attachment setItem:item];
+
+NSError *error;
+NSData *attachmentData = [attachment getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:attachmentData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-item-attachment-from-message-beta-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-item-attachment-from-message-beta-objc-snippets.md
@@ -0,0 +1,45 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/messages/AAMkpsDRVK/attachments"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphAttachment *attachment = [[MSGraphAttachment alloc] init];
+[attachment setName:@"Holiday event"];
+MSGraphOutlookItem *item = [[MSGraphOutlookItem alloc] init];
+[item setSubject:@"Discuss gifts for children"];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType html]];
+[body setContent:@"Let's look for funding!"];
+[item setBody:body];
+MSGraphDateTimeTimeZone *start = [[MSGraphDateTimeTimeZone alloc] init];
+[start setDateTime: "2016-12-02T18:00:00"];
+[start setTimeZone:@"Pacific Standard Time"];
+[item setStart:start];
+MSGraphDateTimeTimeZone *end = [[MSGraphDateTimeTimeZone alloc] init];
+[end setDateTime: "2016-12-02T19:00:00"];
+[end setTimeZone:@"Pacific Standard Time"];
+[item setEnd:end];
+[attachment setItem:item];
+
+NSError *error;
+NSData *attachmentData = [attachment getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:attachmentData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-item-attachment-with-post-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-item-attachment-with-post-objc-snippets.md
@@ -0,0 +1,55 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/1848753d-185d-4c08-a4e4-6ee40521d115/threads/AAQkADJUdfolA==/reply"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
+
+MSGraphPost *post = [[MSGraphPost alloc] init];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType text]];
+[body setContent:@"I attached an event."];
+[post setBody:body];
+NSMutableArray *attachmentsList = [[NSMutableArray alloc] init];
+MSGraphAttachment *attachments = [[MSGraphAttachment alloc] init];
+[attachments setName:@"Holiday event"];
+MSGraphOutlookItem *item = [[MSGraphOutlookItem alloc] init];
+[item setSubject:@"Discuss gifts for children"];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType html]];
+[body setContent:@"Let's look for funding!"];
+[item setBody:body];
+MSGraphDateTimeTimeZone *start = [[MSGraphDateTimeTimeZone alloc] init];
+[start setDateTime: "2019-12-02T18:00:00"];
+[start setTimeZone:@"Pacific Standard Time"];
+[item setStart:start];
+MSGraphDateTimeTimeZone *end = [[MSGraphDateTimeTimeZone alloc] init];
+[end setDateTime: "2019-12-02T19:00:00"];
+[end setTimeZone:@"Pacific Standard Time"];
+[item setEnd:end];
+[attachments setItem:item];
+[attachmentsList addObject: attachments];
+[post setAttachments:attachmentsList];
+payloadDictionary[@"post"] = post;
+
+NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
+[urlRequest setHTTPBody:data];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-listitem-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-listitem-objc-snippets.md
@@ -7,20 +7,17 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{site-id}/lists/{list-id}/items"]]];
-[urlRequest setHTTPMethod:@"POST"];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{site-id}/lists/{list-id}/items/{item-id}/fields"]]];
+[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
-MSGraphListItem *listItem = [[MSGraphListItem alloc] init];
-MSGraphFieldValueSet *fields = [[MSGraphFieldValueSet alloc] init];
-[fields setTitle:@"Widget"];
-[fields setColor:@"Purple"];
-[fields setWeight: 32];
-[listItem setFields:fields];
+MSGraphFieldValueSet *fieldValueSet = [[MSGraphFieldValueSet alloc] init];
+[fieldValueSet setColor:@"Fuchsia"];
+[fieldValueSet setQuantity: 934];
NSError *error;
-NSData *listItemData = [listItem getSerializedDataWithError:&error];
-[urlRequest setHTTPBody:listItemData];
+NSData *fieldValueSetData = [fieldValueSet getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:fieldValueSetData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-permission-from--objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-permission-from--objc-snippets.md
@@ -0,0 +1,40 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphPermission *permission = [[MSGraphPermission alloc] init];
+NSMutableArray *rolesList = [[NSMutableArray alloc] init];
+[rolesList addObject: @"write"];
+[permission setRoles:rolesList];
+NSMutableArray *grantedToIdentitiesList = [[NSMutableArray alloc] init];
+MSGraphIdentitySet *grantedToIdentities = [[MSGraphIdentitySet alloc] init];
+MSGraphIdentity *application = [[MSGraphIdentity alloc] init];
+[application setId:@"89ea5c94-7736-4e25-95ad-3fa95f62b66e"];
+[application setDisplayName:@"Foo App"];
+[grantedToIdentities setApplication:application];
+[grantedToIdentitiesList addObject: grantedToIdentities];
+[permission setGrantedToIdentities:grantedToIdentitiesList];
+
+NSError *error;
+NSData *permissionData = [permission getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:permissionData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-trustframeworkkeyset-from-trustframework1-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/create-trustframeworkkeyset-from-trustframework1-objc-snippets.md
@@ -0,0 +1,30 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/trustFramework/keySets"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphTrustFrameworkKeySet *trustFrameworkKeySet = [[MSGraphTrustFrameworkKeySet alloc] init];
+[trustFrameworkKeySet setId:@"keyset1"];
+
+NSError *error;
+NSData *trustFrameworkKeySetData = [trustFrameworkKeySet getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:trustFrameworkKeySetData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/delete-b2xuserflows-identityproviders-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/delete-b2xuserflows-identityproviders-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2xUserFlows/B2X_1_PartnerSignUp/identityProviders/Facebook-OAUTH/$ref"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2cUserFlows/B2C_1_CustomerSignUp/identityProviders/Facebook-OAUTH/$ref"]]];
[urlRequest setHTTPMethod:@"DELETE"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/delete-educationassignment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/delete-educationassignment-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/classes/11014/assignments/19002"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/classes/11014/assignmentCategories/19002"]]];
[urlRequest setHTTPMethod:@"DELETE"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/delete-permission-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/delete-permission-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/drive/root/items/{item-id}/permissions/{perm-id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions/{permissionId}"]]];
[urlRequest setHTTPMethod:@"DELETE"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-accesspackageresourceenvironment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-accesspackageresourceenvironment-objc-snippets.md
@@ -0,0 +1,22 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityGovernance/entitlementManagement/accessPackageResourceEnvironments/{accessPackageResourceEnvironmentId}"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ MSGraphAccessPackageResourceEnvironment *accessPackageResourceEnvironment = [[MSGraphAccessPackageResourceEnvironment alloc] initWithData:data error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-bitlockerrecoverykey-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-bitlockerrecoverykey-objc-snippets.md
@@ -7,17 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/bitlocker/recoveryKeys?$filter=deviceId%20eq%20'1ab40ab2-32a8-4b00-b6b5-ba724e407de9'"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/bitlocker/recoveryKeys/b465e4e8-e4e8-b465-e8e4-65b4e8e465b4?$select=key"]]];
[urlRequest setHTTPMethod:@"GET"];
-[urlRequest setValue:@"\"My Friendly Client\"" forHTTPHeaderField:@"ocp-client-name"];
-[urlRequest setValue:@"\"1.2\"" forHTTPHeaderField:@"ocp-client-version"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphBitlockerRecoveryKey *bitlockerRecoveryKey = [[MSGraphBitlockerRecoveryKey alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphBitlockerRecoveryKey *bitlockerRecoveryKey = [[MSGraphBitlockerRecoveryKey alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-buckets-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-buckets-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/planner/plans/2txjA-BMZEq-bKi6Wfj5aGQAB1OJ/buckets"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/planner/buckets"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-classes-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-classes-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/classes"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/schools/10002/classes"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-cloudpconpremisesconnection-withdetails-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-cloudpconpremisesconnection-withdetails-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/deviceManagement/virtualEndpoint/onPremisesConnections/{id}?$select=id,displayName,subscriptionId,subscriptionName,adDomainName,adDomainUsername,organizationalUnit,virtualNetworkId,subnetId,healthCheckStatus,healthCheckStatusDetails,inUse"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/deviceManagement/virtualEndpoint/onPremisesConnections/{id}?$select=id,displayName,healthCheckStatus,healthCheckStatusDetails,inUse"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-connectors-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-connectors-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/onPremisesPublishingProfiles/applicationProxy/connectors"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/print/connectors"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
@@ -15,7 +15,7 @@ MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
NSError *jsonError = nil; MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphConnector *connector = [[MSGraphConnector alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphPrintConnector *printConnector = [[MSGraphPrintConnector alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-contract-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-contract-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/contracts/{id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/contracts"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphContract *contract = [[MSGraphContract alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphContract *contract = [[MSGraphContract alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-custodian-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-custodian-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/2192ca408ea2410eba3bec8ae873be6b/custodians"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/2192ca408ea2410eba3bec8ae873be6b/custodians/45454331323337443946343043464239"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphCustodian *custodian = [[MSGraphCustodian alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphCustodian *custodian = [[MSGraphCustodian alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-educationuser-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-educationuser-objc-snippets.md
@@ -7,13 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/users/13012"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/me/user"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphEducationUser *educationUser = [[MSGraphEducationUser alloc] initWithData:data error:&nserror];
+ MSGraphUser *user = [[MSGraphUser alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-emailauthenticationmethod-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-emailauthenticationmethod-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/authentication/emailMethods/3ddfcfc8-9383-446f-83cc-3ab9be4be18f"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/authentication/emailMethods"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphEmailAuthenticationMethod *emailAuthenticationMethod = [[MSGraphEmailAuthenticationMethod alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphEmailAuthenticationMethod *emailAuthenticationMethod = [[MSGraphEmailAuthenticationMethod alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-endpoints-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-endpoints-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/print/reports/dailyPrintUsageSummariesByPrinter"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/{id}/endpoints"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphReportRoot *reportRoot = [[MSGraphReportRoot alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphEndpoint *endpoint = [[MSGraphEndpoint alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-group-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-group-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/termStore/groups"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/45b7d2e7-b882-4a80-ba97-10b7a63b8fa4"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphGroup *group = [[MSGraphGroup alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphGroup *group = [[MSGraphGroup alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-grouplifecyclepolicy-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-grouplifecyclepolicy-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groupLifecyclePolicies"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groupLifecyclePolicies/{id}"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphGroupLifecyclePolicy *groupLifecyclePolicy = [[MSGraphGroupLifecyclePolicy alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphGroupLifecyclePolicy *groupLifecyclePolicy = [[MSGraphGroupLifecyclePolicy alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-identityprovider-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-identityprovider-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityProviders/{id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityProviders"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphIdentityProvider *identityProvider = [[MSGraphIdentityProvider alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphIdentityProvider *identityProvider = [[MSGraphIdentityProvider alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-itemphone-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-itemphone-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/profile/phones"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/profile/phones/{id}"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphItemPhone *itemPhone = [[MSGraphItemPhone alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphItemPhone *itemPhone = [[MSGraphItemPhone alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-jobs-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-jobs-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/print/printers/{id}/jobs"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/servicePrincipals/{id}/synchronization/jobs/"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
@@ -15,7 +15,7 @@ MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
NSError *jsonError = nil; MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphPrintJob *printJob = [[MSGraphPrintJob alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphSynchronizationJob *synchronizationJob = [[MSGraphSynchronizationJob alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-names-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-names-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/drive/items/{id}/workbook/names"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/profile/names"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
@@ -15,7 +15,7 @@ MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
NSError *jsonError = nil; MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphWorkbookNamedItem *workbookNamedItem = [[MSGraphWorkbookNamedItem alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphPersonName *personName = [[MSGraphPersonName alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-passwordlessmicrosoftauthenticatorauthenticationmethod-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-passwordlessmicrosoftauthenticatorauthenticationmethod-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/authentication/passwordlessMicrosoftAuthenticatorMethods/R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/authentication/passwordlessMicrosoftAuthenticatorMethods"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphPasswordlessMicrosoftAuthenticatorAuthenticationMethod *passwordlessMicrosoftAuthenticatorAuthenticationMethod = [[MSGraphPasswordlessMicrosoftAuthenticatorAuthenticationMethod alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphPasswordlessMicrosoftAuthenticatorAuthenticationMethod *passwordlessMicrosoftAuthenticatorAuthenticationMethod = [[MSGraphPasswordlessMicrosoftAuthenticatorAuthenticationMethod alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-permission-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-permission-objc-snippets.md
@@ -0,0 +1,22 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions/{permissionId}"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ MSGraphPermission *permission = [[MSGraphPermission alloc] initWithData:data error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-plans-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-plans-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/planner/plans"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/planner/plans"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-printjob-withtasks-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-printjob-withtasks-objc-snippets.md
@@ -0,0 +1,22 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/print/printers/c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb/jobs/5182?$expand=tasks"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ MSGraphPrintJob *printJob = [[MSGraphPrintJob alloc] initWithData:data error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-privilegedapproval-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-privilegedapproval-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/privilegedApproval/{id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/privilegedApproval"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphPrivilegedApproval *privilegedApproval = [[MSGraphPrivilegedApproval alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphPrivilegedApproval *privilegedApproval = [[MSGraphPrivilegedApproval alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-replies-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-replies-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/drive/items/{id}/workbook/comments/{id}/replies"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/chats/{id}/messages/{id}/replies"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
@@ -15,7 +15,7 @@ MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
NSError *jsonError = nil; MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphWorkbookCommentReply *workbookCommentReply = [[MSGraphWorkbookCommentReply alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphChatMessage *chatMessage = [[MSGraphChatMessage alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-settings-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-settings-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/analytics/settings"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/settings"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphSettings *settings = [[MSGraphSettings alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphDirectorySetting *directorySetting = [[MSGraphDirectorySetting alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-swapshiftschangerequest-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-swapshiftschangerequest-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/teams/{teamId}/schedule/swapShiftsChangeRequests/{swapShiftsChangeRequestId}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/teams/{teamId}/schedule/swapShiftsChangeRequests"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphSwapShiftsChangeRequest *swapShiftsChangeRequest = [[MSGraphSwapShiftsChangeRequest alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphSwapShiftsChangeRequest *swapShiftsChangeRequest = [[MSGraphSwapShiftsChangeRequest alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-synchronizationschema-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-synchronizationschema-objc-snippets.md
@@ -7,8 +7,9 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/servicePrincipals/{id}/synchronization/jobs/{jobId}/schema"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/servicePrincipals/{servicePrincipalId}/synchronization/jobs/{jobId}/schema"]]];
[urlRequest setHTTPMethod:@"GET"];
+[urlRequest setValue:@"Bearer {Token}" forHTTPHeaderField:@"Authorization"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-term-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-term-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/termStore/groups/{groupId}/sets/{setId}/terms/{termId}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/termStore/sets/{setId}/children"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphTerm *term = [[MSGraphTerm alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphTerm *term = [[MSGraphTerm alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-todotask-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-todotask-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists/AAMkADA1MTHgwAAA=/tasks/721a35e2-35e2-721a-e235-1a72e2351a72"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists/35e2-35e2-721a-e235-1a72e2351a7/tasks"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphTodoTask *todoTask = [[MSGraphTodoTask alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphTodoTask *todoTask = [[MSGraphTodoTask alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-todotasklist-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-todotasklist-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists/AAMkADIyAAAAABrJAAA="]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphTodoTaskList *todoTaskList = [[MSGraphTodoTaskList alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphTodoTaskList *todoTaskList = [[MSGraphTodoTaskList alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-unifiedgroupsource-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-unifiedgroupsource-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/unifiedGroupSources"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/unifiedGroupSources/33434233-3030-3739-3043-393039324633"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphUnifiedGroupSource *unifiedGroupSource = [[MSGraphUnifiedGroupSource alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphUnifiedGroupSource *unifiedGroupSource = [[MSGraphUnifiedGroupSource alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-unifiedroleassignment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-unifiedroleassignment-objc-snippets.md
@@ -7,13 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/roleManagement/directory/roleAssignments/lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1?$expand=roleDefinition,principal,directoryScope"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/roleManagement/deviceManagement/roleAssignments/lAPpYvVpN0KRkAEhdxReEJC2sEqbR_9Hr48lds9SGHI-1?$expand=roleDefinition,principals,directoryScopes"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphUnifiedRoleAssignment *unifiedRoleAssignment = [[MSGraphUnifiedRoleAssignment alloc] initWithData:data error:&nserror];
+ MSGraphUnifiedRoleAssignmentMultiple *unifiedRoleAssignmentMultiple = [[MSGraphUnifiedRoleAssignmentMultiple alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-userflowlanguagepage-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-userflowlanguagepage-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2cUserFlows/B2C_1_Customer/languages/en/defaultPages/idpselections/$value"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identity/b2cUserFlows/B2C_1_Customer/languages/en/defaultPages"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphStream *stream = [[MSGraphStream alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphUserFlowLanguagePage *userFlowLanguagePage = [[MSGraphUserFlowLanguagePage alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-usersource-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/get-usersource-objc-snippets.md
@@ -0,0 +1,24 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/4c8f8f70-7785-4bd4-b296-c98376a2c5e1/custodians/2192ca408ea2410eba3bec8ae873be6b/userSources"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphUserSource *userSource = [[MSGraphUserSource alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/group-create-approleassignment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/group-create-approleassignment-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/servicePrincipals/{id}/appRoleAssignments"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/{id}/appRoleAssignments"]]];
[urlRequest setHTTPMethod:@"POST"]; [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/list-accesspackageresourceenvironment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/list-accesspackageresourceenvironment-objc-snippets.md
@@ -0,0 +1,24 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityGovernance/entitlementManagement/accessPackageResourceEnvironments?$filter=originSystem%20eq%20'SharePointOnline'"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphAccessPackageResourceEnvironment *accessPackageResourceEnvironment = [[MSGraphAccessPackageResourceEnvironment alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/list-permission-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/list-permission-objc-snippets.md
@@ -0,0 +1,24 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphPermission *permission = [[MSGraphPermission alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/list-usageright-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/list-usageright-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/{userId}/usageRights?$filter=state%20in%20('active',%20'suspended')%20and%20serviceIdentifier%20in%20('ABCD')"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/devices/{objectId}/usageRights?$filter=state%20in%20('active',%20'suspended')%20and%20serviceIdentifier%20in%20('ABCD')"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/sendreminder-accessreview-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/sendreminder-accessreview-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/accessReviews/2975E9B5-44CE-4E71-93D3-30F03B5AA992/sendReminder"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityGovernance/accessReviews/definitions/04e5c3b2-9db2-40d3-a204-128f4956ae8e/instances/70463350-742e-4909-bfa5-bc23447bd002/sendReminder"]]];
[urlRequest setHTTPMethod:@"POST"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/shift-get-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/shift-get-objc-snippets.md
@@ -7,13 +7,41 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/871dbd5c-3a6a-4392-bfe1-042452793a50/shiftPreferences"]]];
-[urlRequest setHTTPMethod:@"GET"];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/871dbd5c-3a6a-4392-bfe1-042452793a50/settings/shiftPreferences"]]];
+[urlRequest setHTTPMethod:@"PUT"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphShiftPreferences *shiftPreferences = [[MSGraphShiftPreferences alloc] init];
+[shiftPreferences setId:@"SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7"];
+NSMutableArray *availabilityList = [[NSMutableArray alloc] init];
+MSGraphShiftAvailability *availability = [[MSGraphShiftAvailability alloc] init];
+MSGraphPatternedRecurrence *recurrence = [[MSGraphPatternedRecurrence alloc] init];
+MSGraphRecurrencePattern *pattern = [[MSGraphRecurrencePattern alloc] init];
+[pattern setType: [MSGraphRecurrencePatternType weekly]];
+NSMutableArray *daysOfWeekList = [[NSMutableArray alloc] init];
+[daysOfWeekList addObject: @"Monday"];
+[daysOfWeekList addObject: @"Wednesday"];
+[daysOfWeekList addObject: @"Friday"];
+[pattern setDaysOfWeek:daysOfWeekList];
+[pattern setInterval: 1];
+[recurrence setPattern:pattern];
+MSGraphRecurrenceRange *range = [[MSGraphRecurrenceRange alloc] init];
+[range setType: [MSGraphRecurrenceRangeType noEnd]];
+[recurrence setRange:range];
+[availability setRecurrence:recurrence];
+[availability setTimeZone:@"Pacific Standard Time"];
+[availability setTimeSlots: null];
+[availabilityList addObject: availability];
+[shiftPreferences setAvailability:availabilityList];
+
+NSError *error;
+NSData *shiftPreferencesData = [shiftPreferences getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:shiftPreferencesData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphShiftPreferences *shiftPreferences = [[MSGraphShiftPreferences alloc] initWithData:data error:&nserror];
+ //Request Completed
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/update-authzpolicy-guestuserlevel-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/update-authzpolicy-guestuserlevel-objc-snippets.md
@@ -0,0 +1,29 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/policies/authorizationPolicy/authorizationPolicy"]]];
+[urlRequest setHTTPMethod:@"PATCH"];
+
+MSGraphAuthorizationPolicy *authorizationPolicy = [[MSGraphAuthorizationPolicy alloc] init];
+[authorizationPolicy setGuestUserRole:@"2af84b1e-32c8-42b7-82bc-daa82404023b"];
+
+NSError *error;
+NSData *authorizationPolicyData = [authorizationPolicy getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:authorizationPolicyData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/update-organizationalbrandingproperties-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/update-organizationalbrandingproperties-objc-snippets.md
@@ -7,17 +7,16 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding/localizations/fr"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/organization/d69179bf-f4a4-41a9-a9de-249c0f2efb1d/branding"]]];
[urlRequest setHTTPMethod:@"PUT"]; [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
-MSGraphOrganizationalBrandingLocalization *organizationalBrandingLocalization = [[MSGraphOrganizationalBrandingLocalization alloc] init];
-[organizationalBrandingLocalization setBackgroundColor:@"#00000F"];
-[organizationalBrandingLocalization setSignInPageText:@"fr"];
+MSGraphOrganizationalBranding *organizationalBranding = [[MSGraphOrganizationalBranding alloc] init];
+[organizationalBranding setBackgroundColor:@"#FFFF33"];
NSError *error;
-NSData *organizationalBrandingLocalizationData = [organizationalBrandingLocalization getSerializedDataWithError:&error];
-[urlRequest setHTTPBody:organizationalBrandingLocalizationData];
+NSData *organizationalBrandingData = [organizationalBranding getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:organizationalBrandingData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/update-permission-from--objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/update-permission-from--objc-snippets.md
@@ -0,0 +1,32 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions/{permissionId}"]]];
+[urlRequest setHTTPMethod:@"PATCH"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphPermission *permission = [[MSGraphPermission alloc] init];
+NSMutableArray *rolesList = [[NSMutableArray alloc] init];
+[rolesList addObject: @"read"];
+[permission setRoles:rolesList];
+
+NSError *error;
+NSData *permissionData = [permission getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:permissionData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/user-list-teamsapps-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/includes/snippets/objc/user-list-teamsapps-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/{id}/teamwork/installedApps/{id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/{id}/teamwork/installedApps"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphUserScopeTeamsAppInstallation *userScopeTeamsAppInstallation = [[MSGraphUserScopeTeamsAppInstallation alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphUserScopeTeamsAppInstallation *userScopeTeamsAppInstallation = [[MSGraphUserScopeTeamsAppInstallation alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/resources/calendarpermission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/resources/calendarpermission.md
@@ -40,7 +40,7 @@ Once a sharee or delegate has been set up for a calendar, you can [update](../ap
### calendarRoleType values
-| Values | Description |
+| Member | Description |
|:--|:| | none | Calendar is not shared with the user. | | freeBusyRead | User is a sharee who can view free/busy status of the owner on the calendar. |
v1.0 https://docs.microsoft.com/en-us/graph/resources/enums-termstore https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/resources/enums-termstore.md
@@ -15,7 +15,7 @@ Namespace: microsoft.graph.termstore
Specifies the value types relations can take in a termstore
-|Members|
+|Member|
|:| |pin| |reuse|
@@ -24,7 +24,7 @@ Specifies the value types relations can take in a termstore
Specifies the values different group types can take within the termstore
-|Members|
+|Member|
|:| |global| |system|
v1.0 https://docs.microsoft.com/en-us/graph/resources/group https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/resources/group.md
@@ -154,7 +154,7 @@ This resource supports:
|unseenConversationsCount|Int32|Count of conversations that have been delivered one or more new posts since the signed-in user's last visit to the group. This property is the same as **unseenCount**. <br><br>Returned only on $select.| |unseenCount|Int32|Count of conversations that have received new posts since the signed-in user last visited the group. This property is the same as **unseenConversationsCount**.<br><br>Returned only on $select. | |unseenMessagesCount|Int32|Count of new posts that have been delivered to the group's conversations since the signed-in user's last visit to the group. <br><br>Returned only on $select.|
-|visibility|String| Specifies the visibility of a Microsoft 365 group. Possible values are: `Private`, `Public`, or `Hiddenmembership`; blank values are treated as public. See [group visibility options](#group-visibility-options) to learn more.<br>Visibility can be set only when a group is created; it is not editable.<br>Visibility is supported only for unified groups; it is not supported for security groups. <br><br>Returned by default.|
+|visibility|String| Specifies the group join policy and group content visibility for groups. Possible values are: `Private`, `Public`, or `Hiddenmembership`. `Hiddenmembership` can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation.<br> If visibility value is not specified during group creation on Microsoft Graph, a security group is created as `Private` by default and Microsoft 365 group is `Public`. See [group visibility options](#group-visibility-options) to learn more. <br><br>Returned by default.|
### Group visibility options
v1.0 https://docs.microsoft.com/en-us/graph/resources/identityuserflow https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/resources/identityuserflow.md
@@ -28,7 +28,7 @@ User Flows enable you to define predefined, configurable policies for sign in, s
| Property | Type | Description | |:-|:|:|
-|id|String| Read-only.|
+|id|String| The identifier of the user flow. The prefix of **B2C_1_** is added to the value that you provide.|
|userFlowType|string| Possible values are: `signUp`, `signIn`, `signUpOrSignIn`, `passwordReset`, `profileUpdate`, `resourceOwner`, `unknownFutureValue`.| |userFlowTypeVersion|Single| This is the version of the user flow type. Each user flow type can have different possible versions such as 1, 1.1 or 2. |
v1.0 https://docs.microsoft.com/en-us/graph/resources/permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/resources/permission.md
@@ -73,7 +73,7 @@ Here is a JSON representation of the resource.
### Roles property values
-| Role | Details |
+| Value | Description |
|:|:-| | read | Provides the ability to read the metadata and contents of the item. | | write | Provides the ability to read and modify the metadata and contents of the item. |
v1.0 https://docs.microsoft.com/en-us/graph/resources/personOrGroupColumn https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/beta/resources/personOrGroupColumn.md
@@ -36,9 +36,9 @@ Here is a JSON representation of a **personOrGroupColumn** resource.
| **displayAs** | string | How to display the information about the person or group chosen. See below. | **chooseFromType** | string | Whether to allow selection of people only, or people and groups. Must be one of `peopleAndGroups` or `peopleOnly`.
-## DisplayAs values
+## displayAs values
-| DisplayAs value | Description |
+| Value | Description |
|:|:| | **account** | The raw SharePoint encoded claim string for the person or group (eg. `i:0#.f|membership|jane@contoso.com`). | | **department** | The person or group's department. |
v1.0 https://docs.microsoft.com/en-us/graph/api/application-post-calls https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/application-post-calls.md
@@ -896,6 +896,309 @@ Content-Type: application/json
} ```
+### Example 7: Create peer-to-peer PSTN call with service hosted media
+
+> **Note:** This call requires the Calls.Initiate.All permission.
+
+This call requires an application instance with a PSTN number assigned.
+
+#### Step 1: Create application instance
+Using tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to create the application instance. For more information, see [New-CsOnlineApplicationInstance](/powershell/module/skype/new-csonlineapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> New-CsOnlineApplicationInstance -UserPrincipalName <UPN> -DisplayName <DisplayName> -ApplicationId <AppId>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+#### Step 2: Assign Microsoft 365 licenses
+1. Use tenant admin credentials to sign in to https://admin.microsoft.com/ and go to the **Users -> Active users** tab.
+2. Select the application instance, assign **Microsoft 365 Domestic and International Calling Plan** and **Microsoft 365 Phone System - Virtual User** licenses, and click **Save changes**. If the required licenses are not available in the tenant, you can get them from the **Billing -> Purchase services** tab.
+#### Step 3: Acquire PSTN number
+1. Use tenant admin credentials to sign in to https://admin.teams.microsoft.com/ and click the **Legacy portal** tab on the left panel.
+2. In the new page, go to the **voice -> phone numbers** tab.
+3. Click the **+** button, select **New Service Numbers**, and go to the **Add new service numbers** page.
+4. Select **Country/Region**, **State/Region**, **City**, input **Quantity**, and click **add** to search. Click **acquire numbers**. The newly acquired number will show on the **phone numbers** tab.
+#### Step 4: Assign PSTN number to application instance
+With tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to assign the PSTN number to the application instance. For more information, see [Set-CsOnlineVoiceApplicationInstance](https://docs.microsoft.com/powershell/module/skype/set-csonlinevoiceapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](https://docs.microsoft.com/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+
+#### Request
+The following example shows the request to make a peer-to-peer call between the bot and a PSTN number. In this example, the media is hosted by the service. The values of authorization token, callback URL, application ID, application name, user ID, user name, and tenant ID must be replaced with actual values to make the example work.
+
+<!-- {
+ "blockType": "request",
+ "name": "create-call-service-hosted-media",
+ "@odata.type": "microsoft.graph.call"
+}-->
+```http
+POST https://graph.microsoft.com/v1.0/communications/calls
+Content-Type: application/json
+
+{
+ "@odata.type": "#microsoft.graph.call",
+ "callbackUri": "https://bot.contoso.com/callback",
+ "source": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "applicationInstance": {
+ "@odata.type": "#microsoft.graph.identity",
+ "displayName": "Calling Bot",
+ "id": "3d913abb-aec0-4964-8fa6-3c6850c4f278"
+ },
+ },
+ "countryCode": null,
+ "endpointType": null,
+ "region": null,
+ "languageId": null
+ },
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ }
+ }
+ ],
+ "requestedModalities": [
+ "audio"
+ ],
+ "mediaConfig": {
+ "@odata.type": "#microsoft.graph.serviceHostedMediaConfig"
+ }
+}
+```
+
+#### Response
+
+> **Note:** The response object shown here might be shortened for readability.
+
+<!-- {
+ "blockType": "response",
+ "truncated": true,
+ "@odata.type": "microsoft.graph.call"
+} -->
+```http
+HTTP/1.1 201 Created
+Location: https://graph.microsoft.com/v1.0/communications/calls/2e1a0b00-2db4-4022-9570-243709c565ab
+Content-Type: application/json
+
+{
+ "@odata.type": "#microsoft.graph.call",
+ "state": "establishing",
+ "direction": "outgoing",
+ "callbackUri": "https://bot.contoso.com/callback",
+ "callChainId": "d8217646-3110-40b1-bae6-e9ac6c3a9f74",
+ "callRoutes": [],
+ "source": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "applicationInstance": {
+ "@odata.type": "#microsoft.graph.identity",
+ "displayName": "Calling Bot",
+ "id": "3d913abb-aec0-4964-8fa6-3c6850c4f278"
+ },
+ },
+ "countryCode": null,
+ "endpointType": null,
+ "region": null,
+ "languageId": null
+ },
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ },
+ "endpointType": null,
+ "region": null,
+ "replacesCallId": null,
+ "languageId": null
+ }
+ ],
+ "requestedModalities": [
+ "audio"
+ ],
+ "activeModalities": [],
+ "mediaConfig": {
+ "@odata.type": "#microsoft.graph.serviceHostedMediaConfig",
+ "preFetchMedia": [
+ {
+ "uri": "https://cdn.contoso.com/beep.wav",
+ "resourceId": "f8971b04-b53e-418c-9222-c82ce681a582"
+ },
+ {
+ "uri": "https://cdn.contoso.com/cool.wav",
+ "resourceId": "86dc814b-c172-4428-9112-60f8ecae1edb"
+ }
+ ],
+ },
+ "routingPolicies": [],
+ "tenantId": "aa67bd4c-8475-432d-bd41-39f255720e0a",
+ "myParticipantId": "499ff390-7a72-40e8-83a0-8fac6295ae7e",
+ "id": "2e1a0b00-2db4-4022-9570-243709c565ab",
+ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#app/calls/$entity",
+ "subject": null,
+ "terminationReason": null,
+ "ringingTimeoutInSeconds": null,
+ "mediaState": null,
+ "resultInfo": null,
+ "answeredBy": null,
+ "chatInfo": null,
+ "meetingInfo": null,
+ "transcription": null,
+ "meetingCapability": null,
+ "toneInfo": null
+}
+```
+
+### Example 8: Create peer-to-peer PSTN call with application hosted media
+
+> **Note**: This example requires Calls.Initiate.All and Calls.AccessMedia.All permissions.
+
+This call needs application instance with PSTN number assigned, as described in Example 7.
+
+#### Request
+The following example shows a request to make a peer-to-peer call between the bot and a PSTN number. In this example, the media is hosted locally by the application. Replace the values for authorization token, callback URL, application ID, application name, user ID, user name, and tenant ID to make the example work.
+
+<!-- {
+ "blockType": "request",
+ "name": "create-call-service-hosted-media",
+ "@odata.type": "microsoft.graph.call"
+}-->
+```http
+POST https://graph.microsoft.com/v1.0/communications/calls
+Content-Type: application/json
+
+{
+ "@odata.type": "#microsoft.graph.call",
+ "callbackUri": "https://bot.contoso.com/callback",
+ "source": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "applicationInstance": {
+ "@odata.type": "#microsoft.graph.identity",
+ "displayName": "Calling Bot",
+ "id": "3d913abb-aec0-4964-8fa6-3c6850c4f278"
+ },
+ },
+ "countryCode": null,
+ "endpointType": null,
+ "region": null,
+ "languageId": null
+ },
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ }
+ }
+ ],
+ "requestedModalities": [
+ "audio"
+ ],
+ "mediaConfig": {
+ "@odata.type": "#microsoft.graph.appHostedMediaConfig",
+ "blob": "<Media Session Configuration>"
+ }
+}
+```
+
+#### Response
+
+> **Note:** The response object shown here might be shortened for readability.
+
+<!-- {
+ "blockType": "response",
+ "truncated": true,
+ "@odata.type": "microsoft.graph.call"
+} -->
+```http
+HTTP/1.1 201 Created
+Location: https://graph.microsoft.com/v1.0/communications/calls/2e1a0b00-2db4-4022-9570-243709c565ab
+Content-Type: application/json
+
+{
+ "@odata.type": "#microsoft.graph.call",
+ "state": "establishing",
+ "direction": "outgoing",
+ "callbackUri": "https://bot.contoso.com/callback",
+ "callChainId": "d8217646-3110-40b1-bae6-e9ac6c3a9f74",
+ "callRoutes": [],
+ "source": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "applicationInstance": {
+ "@odata.type": "#microsoft.graph.identity",
+ "displayName": "Calling Bot",
+ "id": "3d913abb-aec0-4964-8fa6-3c6850c4f278"
+ },
+ },
+ "countryCode": null,
+ "endpointType": null,
+ "region": null,
+ "languageId": null
+ },
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ },
+ "endpointType": null,
+ "region": null,
+ "replacesCallId": null,
+ "languageId": null
+ }
+ ],
+ "requestedModalities": [
+ "audio"
+ ],
+ "activeModalities": [],
+ "mediaConfig": {
+ "@odata.type": "#microsoft.graph.appHostedMediaConfig",
+ "blob": "<Media Session Configuration>",
+ },
+ "routingPolicies": [],
+ "tenantId": "aa67bd4c-8475-432d-bd41-39f255720e0a",
+ "myParticipantId": "499ff390-7a72-40e8-83a0-8fac6295ae7e",
+ "id": "2e1a0b00-2db4-4022-9570-243709c565ab",
+ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#app/calls/$entity",
+ "subject": null,
+ "terminationReason": null,
+ "ringingTimeoutInSeconds": null,
+ "mediaState": null,
+ "resultInfo": null,
+ "answeredBy": null,
+ "chatInfo": null,
+ "meetingInfo": null,
+ "transcription": null,
+ "meetingCapability": null,
+ "toneInfo": null
+}
+```
+ <!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79 2015-10-25 14:57:30 UTC --> <!--
v1.0 https://docs.microsoft.com/en-us/graph/api/call-redirect https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/call-redirect.md
@@ -395,6 +395,201 @@ Content-Type: application/json
} ```
+### Example 3: Forward a call to a PSTN number
+
+This call requires an application instance with a PSTN number assigned.
+
+#### Step 1: Create application instance
+Using tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to create the application instance. For more information, see [New-CsOnlineApplicationInstance](/powershell/module/skype/new-csonlineapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> New-CsOnlineApplicationInstance -UserPrincipalName <UPN> -DisplayName <DisplayName> -ApplicationId <AppId>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+#### Step 2: Assign Microsoft 365 licenses
+1. Use tenant admin credentials to sign in to https://admin.microsoft.com/ and go to the **Users -> Active users** tab.
+2. Select the application instance, assign **Microsoft 365 Domestic and International Calling Plan** and **Microsoft 365 Phone System - Virtual User** licenses, and click **Save changes**. If the required licenses are not available in the tenant, you can get them from the **Billing -> Purchase services** tab.
+#### Step 3: Acquire PSTN number
+1. Use tenant admin credentials to sign in to https://admin.teams.microsoft.com/ and click the **Legacy portal** tab on the left panel.
+2. In the new page, go to the **voice -> phone numbers** tab.
+3. Click the **+** button, select **New Service Numbers**, and go to the **Add new service numbers** page.
+4. Select **Country/Region**, **State/Region**, **City**, input **Quantity**, and click **add** to search. Click **acquire numbers**. The newly acquired number will show on the **phone numbers** tab.
+#### Step 4: Assign PSTN number to application instance
+With tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to assign the PSTN number to the application instance. For more information, see [Set-CsOnlineVoiceApplicationInstance](https://docs.microsoft.com/powershell/module/skype/set-csonlinevoiceapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](https://docs.microsoft.com/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+
+#### Notification - incoming
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+``` json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "created",
+ "resourceUrl": "/communications/calls/491f0b00-ffff-4bc9-a43e-b226498ec22a",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "incoming",
+ "direction": "incoming",
+ "callbackUri": "https://bot.contoso.com/api/calls/24701998-1a73-4d42-8085-bf46ed0ae039",
+ "source": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "user": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "8d1e6ab6-26c5-4e22-a1bc-06ea7343958e",
+ "tenantId": "632899f8-2ea1-4604-8413-27bd2892079f"
+ }
+ },
+ "region": "amer",
+ },
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "applicationInstance": {
+ "@odata.type": "#microsoft.graph.identity",
+ "displayName": "PstnAppInstance",
+ "id": "7629bdce-046c-4903-86b4-a8f718277e1a",
+ "tenantId": "632899f8-2ea1-4604-8413-27bd2892079f"
+ }
+ },
+ "endpointType": "default",
+ "id": "c339cede-4bd6-4f20-ab9f-3a13e65f6d00",
+ "region": "amer",
+ "languageId": null
+ }
+ ],
+ "tenantId": "632899f8-2ea1-4604-8413-27bd2892079f",
+ "myParticipantId": "c339cede-4bd6-4f20-ab9f-3a13e65f6d00",
+ "id": "491f0b00-ffff-4bc9-a43e-b226498ec22a"
+ }
+ }
+ ]
+}
+```
+
+#### Request
+
+<!-- {
+ "blockType": "request",
+ "name": "call-redirect"
+} -->
+``` http
+POST https://graph.microsoft.com/v1.0/communications/calls/491f0b00-ffff-4bc9-a43e-b226498ec22a/redirect
+Content-Type: application/json
+
+{
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ }
+ }
+ ],
+ "callbackUri": "https://bot.contoso.com/api/calls/24701998-1a73-4d42-8085-bf46ed0ae039"
+}
+```
+#### Response
+
+<!-- {
+ "blockType": "response",
+ "@odata.type": "microsoft.graph.None"
+} -->
+```http
+HTTP/1.1 202 Accepted
+```
+#### Notification - terminated
+
+<!-- {
+ "blockType": "example",
+ "name": "call-redirect"
+} -->
+``` http
+POST https://bot.contoso.com/api/calls/24701998-1a73-4d42-8085-bf46ed0ae039
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+} -->
+``` json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "deleted",
+ "resourceUrl": "/communications/calls/491f0b00-ffff-4bc9-a43e-b226498ec22a",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "terminated",
+ "direction": "incoming",
+ "callbackUri": "https://bot.contoso.com/api/calls/24701998-1a73-4d42-8085-bf46ed0ae039",
+ "source": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "user": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "8d1e6ab6-26c5-4e22-a1bc-06ea7343958e",
+ "tenantId": "632899f8-2ea1-4604-8413-27bd2892079f"
+ }
+ },
+ "region": "amer",
+ },
+ "targets": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "applicationInstance": {
+ "@odata.type": "#microsoft.graph.identity",
+ "displayName": "PstnAppInstance",
+ "id": "7629bdce-046c-4903-86b4-a8f718277e1a",
+ "tenantId": "632899f8-2ea1-4604-8413-27bd2892079f"
+ }
+ },
+ "endpointType": "default",
+ "id": "c339cede-4bd6-4f20-ab9f-3a13e65f6d00",
+ "region": "amer",
+ "languageId": null
+ }
+ ],
+ "answeredBy": {
+ "@odata.type": "#microsoft.graph.participantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "encrypted": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "1xt4uextl99sdzwdxuvdxrvgrv8gehcq7jdgf9yhzeto"
+ }
+ },
+ "endpointType": "default"
+ },
+ "tenantId": "632899f8-2ea1-4604-8413-27bd2892079f",
+ "myParticipantId": "c339cede-4bd6-4f20-ab9f-3a13e65f6d00",
+ "id": "491f0b00-ffff-4bc9-a43e-b226498ec22a"
+ }
+ }
+ ]
+}
+```
+ <!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79 2015-10-25 14:57:30 UTC --> <!--
v1.0 https://docs.microsoft.com/en-us/graph/api/call-transfer https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/call-transfer.md
@@ -412,6 +412,370 @@ Content-Type: application/json
} ```
+### Example 3: Call transfer to PSTN number
+
+This call requires an application instance with a PSTN number assigned.
+
+#### Step 1: Create application instance
+Using tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to create the application instance. For more information, see [New-CsOnlineApplicationInstance](/powershell/module/skype/new-csonlineapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> New-CsOnlineApplicationInstance -UserPrincipalName <UPN> -DisplayName <DisplayName> -ApplicationId <AppId>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+#### Step 2: Assign Microsoft 365 licenses
+1. Use tenant admin credentials to sign in to https://admin.microsoft.com/ and go to the **Users -> Active users** tab.
+2. Select the application instance, assign **Microsoft 365 Domestic and International Calling Plan** and **Microsoft 365 Phone System - Virtual User** licenses, and click **Save changes**. If the required licenses are not available in the tenant, you can get them from the **Billing -> Purchase services** tab.
+#### Step 3: Acquire PSTN number
+1. Use tenant admin credentials to sign in to https://admin.teams.microsoft.com/ and click the **Legacy portal** tab on the left panel.
+2. In the new page, go to the **voice -> phone numbers** tab.
+3. Click the **+** button, select **New Service Numbers**, and go to the **Add new service numbers** page.
+4. Select **Country/Region**, **State/Region**, **City**, input **Quantity**, and click **add** to search. Click **acquire numbers**. The newly acquired number will show on the **phone numbers** tab.
+#### Step 4: Assign PSTN number to application instance
+With tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to assign the PSTN number to the application instance. For more information, see [Set-CsOnlineVoiceApplicationInstance](https://docs.microsoft.com/powershell/module/skype/set-csonlinevoiceapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](https://docs.microsoft.com/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+
+#### Request
+The following example shows the request.
+
+<!-- {
+ "blockType": "request",
+ "name": "call-transfer"
+}-->
+```http
+POST https://graph.microsoft.com/v1.0/communications/calls/{id}/transfer
+Content-Type: application/json
+Content-Length: 430
+
+{
+ "transferTarget": {
+ "endpointType": "default",
+ "identity": {
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ },
+ "languageId": "languageId-value",
+ "region": "region-value"
+ },
+ "clientContext": "9e90d1c1-f61e-43e7-9f75-d420159aae08"
+}
+```
+
+#### Response
+
+> **Note:** The response object shown here might be shortened for readability. All the properties will be returned from an actual call.
+
+<!-- {
+ "blockType": "response",
+ "truncated": true,
+ "@odata.type": "microsoft.graph.None"
+}-->
+```http
+HTTP/1.1 202 Accepted
+```
+
+#### Notification - transferring
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "updated",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "transferring"
+ }
+ }
+ ]
+}
+```
+
+#### Notification - transfer accepted
+
+> **Note:** Transfer accepted may happen after or before media state audio inactive.
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "updated",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "transferAccepted"
+ }
+ }
+ ]
+}
+```
+
+#### Notification - transfer completed
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "deleted",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "terminated",
+ "resultInfo": {
+ "@odata.type": "#microsoft.graph.resultInfo",
+ "code": 0,
+ "subcode": 7015,
+ "message": "GracefulTransferCompleted"
+ }
+ }
+ }
+ ]
+}
+```
+### Notification - transfer failed
+
+> **Note:** When a call transfer fails, the call state will be `established`.
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "updated",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "established",
+ "resultInfo": {
+ "@odata.type": "#microsoft.graph.resultInfo",
+ "code": 500,
+ "subCode": 7000,
+ "message": "<message>"
+ }
+ }
+ }
+ ]
+}
+```
+
+### Example 4: Consultative transfer to PSTN number
+
+This call requires an application instance with PSTN number assigned, as described in Example 3.
+
+#### Request
+The following example shows the request.
+
+<!-- {
+ "blockType": "request",
+ "@odata.type": "call-transfer"
+}-->
+
+```http
+POST https://graph.microsoft.com/v1.0/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b/transfer
+Content-Type: application/json
+
+{
+ "transferTarget": {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "endpointType": "default",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ },
+ "languageId": "en-us",
+ "region": "amer",
+ "replacesCallId": "e5d39592-99bd-4db8-bca8-30fb894ec51d"
+ },
+ "clientContext": "9e90d1c1-f61e-43e7-9f75-d420159aae08"
+}
+```
+
+#### Response
+
+> **Note:** The response object shown here might be shortened for readability. All the properties will be returned from an actual call.
+
+<!-- {
+ "blockType": "response",
+ "truncated": true,
+ "@odata.type": "microsoft.graph.None"
+}-->
+```http
+HTTP/1.1 202 Accepted
+```
+
+#### Notification - transferring
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "updated",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "transferring"
+ }
+ }
+ ]
+}
+```
+
+#### Notification - transfer accepted
+
+> **Note:** Transfer accepted may happen after or before media state audio inactive.
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "updated",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "transferAccepted"
+ }
+ }
+ ]
+}
+```
+
+#### Notification - transfer completed
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "deleted",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "terminated",
+ "terminationReason": "AppTransferred"
+ }
+ }
+ ]
+}
+```
+
+#### Notification - transfer failed
+
+> **Note:** When a call transfer fails, the call state will be `established`.
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type": "#microsoft.graph.commsNotifications",
+ "value": [
+ {
+ "@odata.type": "#microsoft.graph.commsNotification",
+ "changeType": "updated",
+ "resourceUrl": "/communications/calls/341a0500-d4bf-4224-8b19-1581168d328b",
+ "resourceData": {
+ "@odata.type": "#microsoft.graph.call",
+ "state": "established",
+ "resultInfo": {
+ "@odata.type": "#microsoft.graph.resultInfo",
+ "code": 500,
+ "subCode": 7700,
+ "message": "<message>"
+ }
+ }
+ }
+ ]
+}
+```
+ <!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79 2015-10-25 14:57:30 UTC --> <!--
v1.0 https://docs.microsoft.com/en-us/graph/api/directoryobject-checkmembergroups https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/directoryobject-checkmembergroups.md
@@ -19,9 +19,9 @@ One of the following permissions is required to call this API. To learn more, in
|Permission type | Permissions (from least to most privileged) | |:--|:|
-|Delegated (work or school account) | User.ReadBasic.All and GroupMember.Read.All, User.Read.All and GroupMember.Read.All, User.ReadBasic.All and Group.Read.All, User.Read.All and Group.Read.All, Directory.Read.All |
+|Delegated (work or school account) | User.ReadBasic.All, User.Read.All, Directory.Read.All |
|Delegated (personal Microsoft account) | Not supported. |
-|Application | User.Read.All and GroupMember.Read.All, User.Read.All and Group.Read.All, Directory.Read.All |
+|Application | User.Read.All, Directory.Read.All |
Use the follow scenario guidance to help determine which permission types to use: - Use User.Read and GroupMember.Read.All or User.Read and Group.Read.All permissions to get group memberships for the signed-in user.
v1.0 https://docs.microsoft.com/en-us/graph/api/participant-invite https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/participant-invite.md
@@ -698,6 +698,200 @@ Content-Type: application/json
>**Note:** With a "completed" status, you can expect to receive notifications on how your original peer-to-peer call has been terminated and deleted.
+### Example 4: Invite one PSTN participant to an existing group call
+
+This call requires an application instance with a PSTN number assigned.
+
+#### Step 1: Create application instance
+Using tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to create the application instance. For more information, see [New-CsOnlineApplicationInstance](/powershell/module/skype/new-csonlineapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> New-CsOnlineApplicationInstance -UserPrincipalName <UPN> -DisplayName <DisplayName> -ApplicationId <AppId>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+#### Step 2: Assign Microsoft 365 licenses
+1. Use tenant admin credentials to sign in to https://admin.microsoft.com/ and go to the **Users -> Active users** tab.
+2. Select the application instance, assign **Microsoft 365 Domestic and International Calling Plan** and **Microsoft 365 Phone System - Virtual User** licenses, and click **Save changes**. If the required licenses are not available in the tenant, you can get them from the **Billing -> Purchase services** tab.
+#### Step 3: Acquire PSTN number
+1. Use tenant admin credentials to sign in to https://admin.teams.microsoft.com/ and click the **Legacy portal** tab on the left panel.
+2. In the new page, go to the **voice -> phone numbers** tab.
+3. Click the **+** button, select **New Service Numbers**, and go to the **Add new service numbers** page.
+4. Select **Country/Region**, **State/Region**, **City**, input **Quantity**, and click **add** to search. Click **acquire numbers**. The newly acquired number will show on the **phone numbers** tab.
+#### Step 4: Assign PSTN number to application instance
+With tenant admin credentials, call the following cmdlets on the tenant remote PowerShell to assign the PSTN number to the application instance. For more information, see [Set-CsOnlineVoiceApplicationInstance](https://docs.microsoft.com/powershell/module/skype/set-csonlinevoiceapplicationinstance?view=skype-ps&preserve-view=true) and [Sync-CsOnlineApplicationInstance](https://docs.microsoft.com/powershell/module/skype/sync-csonlineapplicationinstance?view=skype-ps&preserve-view=true).
+```
+PS C:\> Set-CsOnlineVoiceApplicationInstance -Identity <UPN> -TelephoneNumber <TelephoneNumber>
+PS C:\> Sync-CsOnlineApplicationInstance -ObjectId <ObjectId>
+```
+
+#### Request
+
+<!-- {
+ "blockType": "request",
+ "name": "participant-invite"
+}-->
+```http
+POST /communications/calls/{id}/participants/invite
+Content-Type: application/json
+Content-Length: 464
+
+{
+ "participants": [
+ {
+ "@odata.type": "#microsoft.graph.invitationParticipantInfo",
+ "identity": {
+ "@odata.type": "#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ }
+ }
+ ],
+ "clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
+}
+```
+
+#### Response
+
+> **Note:** The response object shown here might be shortened for readability. All the properties will be returned from an actual call.
+
+<!-- {
+ "blockType": "response",
+ "truncated": true,
+ "@odata.type": "microsoft.graph.inviteParticipantsOperation"
+} -->
+```http
+HTTP/1.1 200 OK
+Content-Type: application/json
+
+{
+ "@odata.type": "#microsoft.graph.inviteParticipantsOperation",
+ "id": "eec3812a-fdc3-4fb4-825c-a06c9f35414e",
+ "status": "Running",
+ "clientContext": "f2fa86af-3c51-4bc2-8fc0-475452d9764f",
+ "resultInfo": null,
+ "participants": [
+ {
+ "endpointType": null,
+ "id": null,
+ "replacesCallId": null,
+ "identity": {
+ "user": null,
+ "guest": null,
+ "encrypted": null,
+ "onPremises": null,
+ "applicationInstance": null,
+ "application": null,
+ "device": null,
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ }
+ }
+ ]
+}
+```
+
+#### Notification - operation completed
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type":"#microsoft.graph.commsNotifications",
+ "value":[
+ {
+ "@odata.type":"#microsoft.graph.commsNotification",
+ "changeType":"deleted",
+ "resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/eec3812a-fdc3-4fb4-825c-a06c9f35414e",
+ "resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/operations/eec3812a-fdc3-4fb4-825c-a06c9f35414e",
+ "resourceData":{
+ "@odata.type":"#microsoft.graph.inviteParticipantsOperation",
+ "participants":[
+ {
+ "@odata.type":"#microsoft.graph.invitationParticipantInfo",
+ "identity":{
+ "@odata.type":"#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ }
+ }
+ ],
+ "status":"completed",
+ "clientContext":"f2fa86af-3c51-4bc2-8fc0-475452d9764f",
+ "id":"eec3812a-fdc3-4fb4-825c-a06c9f35414e"
+ }
+ }
+ ]
+}
+```
+
+#### Notification - roster updated with participant added
+
+```http
+POST https://bot.contoso.com/api/calls
+Content-Type: application/json
+```
+
+<!-- {
+ "blockType": "example",
+ "@odata.type": "microsoft.graph.commsNotifications"
+}-->
+```json
+{
+ "@odata.type":"#microsoft.graph.commsNotifications",
+ "value":[
+ {
+ "@odata.type":"#microsoft.graph.commsNotification",
+ "changeType":"updated",
+ "resource":"/app/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
+ "resourceUrl":"/communications/calls/ab6233a5-20b7-4c5e-bea2-ce56c9776429/participants",
+ "resourceData":[
+ {
+ "@odata.type":"#microsoft.graph.participant",
+ "info":{
+ "@odata.type":"#microsoft.graph.participantInfo",
+ "identity":{
+ "@odata.type":"#microsoft.graph.identitySet",
+ "phone": {
+ "@odata.type": "#microsoft.graph.identity",
+ "id": "+12345678901"
+ }
+ },
+ "endpointType":"default"
+ },
+ "mediaStreams":[
+ {
+ "@odata.type":"#microsoft.graph.mediaStream",
+ "mediaType":"audio",
+ "sourceId":"1",
+ "direction":"sendReceive",
+ "serverMuted":false
+ }
+ ],
+ "isMuted":false,
+ "isInLobby":false,
+ "id":null
+ }
+ ]
+ }
+ ]
+}
+
+```
+
+>**Note:** With a `completed` status, you can expect to receive notifications about how your original peer-to-peer call has been terminated and deleted.
+ <!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79 2015-10-25 14:57:30 UTC --> <!--
v1.0 https://docs.microsoft.com/en-us/graph/api/signin-list https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/signin-list.md
@@ -67,7 +67,7 @@ This method supports the following OData query parameters to help customize the
## Response
-If successful, this method returns a `200 OK` response code and collection of [signIn](../resources/signin.md) objects in the response body.
+If successful, this method returns a `200 OK` response code and collection of [signIn](../resources/signin.md) objects in the response body. The collection of objects is listed in descending order based on **createdDateTime**.
## Example
v1.0 https://docs.microsoft.com/en-us/graph/api/site-delete-permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/site-delete-permission.md
@@ -46,6 +46,8 @@ If successful, this method returns `204 No Content` response code. It does not r
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "delete_permission"
@@ -54,6 +56,24 @@ If successful, this method returns `204 No Content` response code. It does not r
``` http DELETE https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions/{permissionId} ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/site-get-permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/site-get-permission.md
@@ -49,6 +49,8 @@ If successful, this method returns a `200 OK` response code and the [permission]
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "get_permission"
@@ -57,6 +59,24 @@ If successful, this method returns a `200 OK` response code and the [permission]
``` http GET https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions/{permissionId} ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/site-list-permissions https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/site-list-permissions.md
@@ -49,6 +49,8 @@ If successful, this method returns a `200 OK` response code and a collection of
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "list_permission"
@@ -57,6 +59,24 @@ If successful, this method returns a `200 OK` response code and a collection of
``` http GET https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/site-post-permissions https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/site-post-permissions.md
@@ -47,6 +47,8 @@ If successful, this method returns a `201 Created` response code and a [permissi
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "create_permission_from_"
@@ -66,6 +68,24 @@ Content-Type: application/json
}] } ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/site-update-permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/site-update-permission.md
@@ -47,6 +47,8 @@ If successful, this method returns a `200 OK` response code and a [permission](.
## Examples ### Request+
+# [HTTP](#tab/http)
<!-- { "blockType": "request", "name": "update_permission_from_"
@@ -60,6 +62,24 @@ Content-Type: application/json
"roles": ["read"] } ```
+# [C#](#tab/csharp)
+
+# [JavaScript](#tab/javascript)
+
+# [Objective-C](#tab/objc)
+
+# [Java](#tab/java)
+++ ### Response
v1.0 https://docs.microsoft.com/en-us/graph/api/user-getmembergroups https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/user-getmembergroups.md
@@ -24,9 +24,9 @@ One of the following permissions is required to call this API. To learn more, in
| Permission type | Permissions (from least to most privileged) | | :- | : |
-| Delegated (work or school account) | User.ReadBasic.All and GroupMember.Read.All, User.Read and GroupMember.Read.All, User.Read.All and GroupMember.Read.All, User.ReadBasic.All and Group.Read.All, User.Read and Group.Read.All, User.Read.All and Group.Read.All, Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All |
+| Delegated (work or school account) | User.ReadBasic.All, User.Read, User.Read.All, Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All |
| Delegated (personal Microsoft account) | Not supported. |
-| Application | User.Read.All and GroupMember.Read.All, User.Read.All and Group.Read.All, Directory.Read.All, Directory.ReadWrite.All |
+| Application | User.Read.All, Directory.Read.All, Directory.ReadWrite.All |
## HTTP request
v1.0 https://docs.microsoft.com/en-us/graph/api/user-list-messages https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/user-list-messages.md
@@ -13,7 +13,11 @@ Namespace: microsoft.graph
Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders).
-Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request.
+Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000.
+
+To improve the operation response time, use `$select` to specify the exact properties you need; see [example 1](#example-1-list-all-messages) below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the [gateway timeout](/graph/errors#http-status-codes) (HTTP 504).
+
+To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request.
Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see [Paging Microsoft Graph data in your app](/graph/paging).
@@ -82,8 +86,9 @@ Do not supply a request body for this method.
If successful, this method returns a `200 OK` response code and collection of [Message](../resources/message.md) objects in the response body.
-## Example
-##### Request
+## Examples
+### Example 1: List all messages
+#### Request
This example gets the default, top 10 messages in the signed-in user's mailbox. It uses `$select` to return a subset of the properties of each message in the response. # [HTTP](#tab/http)
@@ -112,7 +117,7 @@ GET https://graph.microsoft.com/v1.0/me/messages?$select=sender,subject
-##### Response
+#### Response
Here is an example of the response. To get the next page of messages, apply the URL returned in `@odata.nextLink` to a subsequent GET request. <!-- {
v1.0 https://docs.microsoft.com/en-us/graph/api/user-translateexchangeids https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/api/user-translateexchangeids.md
@@ -48,7 +48,7 @@ POST /users/{id|userPrincipalName}/translateExchangeIds
### exchangeIdFormat values
-| Values | Description |
+| Member | Description |
|:-|:| | entryId | The binary entry ID format used by MAPI clients. | | ewsId | The ID format used by Exchange Web Services clients. |
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/call-answer-service-hosted-media-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/call-answer-service-hosted-media-csharp-snippets.md
@@ -0,0 +1,38 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var callbackUri = "https://bot.contoso.com/api/calls";
+
+var acceptedModalities = new List<Modality>()
+{
+ Modality.Audio
+};
+
+var mediaConfig = new ServiceHostedMediaConfig
+{
+ PreFetchMedia = new List<MediaInfo>()
+ {
+ new MediaInfo
+ {
+ Uri = "https://cdn.contoso.com/beep.wav",
+ ResourceId = "1D6DE2D4-CD51-4309-8DAA-70768651088E"
+ },
+ new MediaInfo
+ {
+ Uri = "https://cdn.contoso.com/cool.wav",
+ ResourceId = "1D6DE2D4-CD51-4309-8DAA-70768651088F"
+ }
+ }
+};
+
+await graphClient.Communications.Calls["57DAB8B1894C409AB240BD8BEAE78896"]
+ .Answer(callbackUri,mediaConfig,acceptedModalities)
+ .Request()
+ .PostAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-directoryobject-from-device-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/create-directoryobject-from-device-csharp-snippets.md
@@ -11,7 +11,7 @@ var directoryObject = new DirectoryObject
Id = "{id}" };
-await graphClient.Devices["{id}"].RegisteredOwners.References
+await graphClient.Devices["{id}"].RegisteredUsers.References
.Request() .AddAsync(directoryObject);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-educationclass-from-educationschool-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/create-educationclass-from-educationschool-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.Education.Schools["{school-id}"].Users["{user-id}"]
+await graphClient.Education.Classes["{class-id}"].Teachers["{teacher-id}"]
.Request() .DeleteAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/create-permission-from--csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/create-permission-from--csharp-snippets.md
@@ -0,0 +1,32 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permission = new Permission
+{
+ Roles = new List<String>()
+ {
+ "write"
+ },
+ GrantedToIdentities = new List<IdentitySet>()
+ {
+ new IdentitySet
+ {
+ Application = new Identity
+ {
+ Id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
+ DisplayName = "Foo App"
+ }
+ }
+ }
+};
+
+await graphClient.Sites["{sitesId}"].Permissions
+ .Request()
+ .AddAsync(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/delete-permission-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/delete-permission-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-await graphClient.Me.Drive.Items["{item-id}"].Permissions["{perm-id}"]
+await graphClient.Sites["{sitesId}"].Permissions["{permissionId}"]
.Request() .DeleteAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-a-count-endswith-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-a-count-endswith-csharp-snippets.md
@@ -9,8 +9,8 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var users = await graphClient.Users .Request() .Header("ConsistencyLevel","eventual")
- .Filter("endswith(mail,'a@contoso.com'),")
- .OrderBy("userPrincipalName ")
+ .Filter("endswith(mail,'a@contoso.com')")
+ .OrderBy("userPrincipalName")
.GetAsync(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-buckets-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-buckets-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var buckets = await graphClient.Planner.Plans["{plan-id}"].Buckets
+var buckets = await graphClient.Planner.Buckets
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-classes-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-classes-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var classes = await graphClient.Education.Classes
+var classes = await graphClient.Education.Schools["{school-id}"].Classes
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-contract-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-contract-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var contract = await graphClient.Contracts["{id}"]
+var contracts = await graphClient.Contracts
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-directoryaudit-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-directoryaudit-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var directoryAudits = await graphClient.AuditLogs.DirectoryAudits
+var directoryAudit = await graphClient.AuditLogs.DirectoryAudits["{id}"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-educationuser-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-educationuser-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var educationUser = await graphClient.Education.Users["{user-id}"]
+var user = await graphClient.Education.Me.User
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-grouplifecyclepolicy-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-grouplifecyclepolicy-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var groupLifecyclePolicies = await graphClient.GroupLifecyclePolicies
+var groupLifecyclePolicy = await graphClient.GroupLifecyclePolicies["{id}"]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-mailboxsettings-1-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-mailboxsettings-1-csharp-snippets.md
@@ -0,0 +1,16 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var me = await graphClient.Me
+ .Request()
+ .Select("MailboxSettings")
+ .GetAsync();
+
+var mailboxSettings = me.MailboxSettings;
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-opentypeextension-3-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-opentypeextension-3-csharp-snippets.md
@@ -8,7 +8,6 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var message = await graphClient.Me.Messages["AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl==="] .Request()
- .Filter("id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')")
.Expand("extensions($filter=id%20eq%20'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-permission-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-permission-csharp-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permission = await graphClient.Sites["{sitesId}"].Permissions["{permissionId}"]
+ .Request()
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-plans-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-plans-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var plans = await graphClient.Planner.Plans
+var plans = await graphClient.Me.Planner.Plans
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-singlevaluelegacyextendedproperty-1-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-singlevaluelegacyextendedproperty-1-csharp-snippets.md
@@ -8,7 +8,6 @@ GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var message = await graphClient.Me.Messages["AAMkAGE1M2_bs88AACHsLqWAAA="] .Request()
- .Filter("id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color')")
.Expand("singleValueExtendedProperties($filter=id%20eq%20'String%20%7B66f5a359-4659-4830-9070-00047ec6ac6e%7D%20Name%20Color')") .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-swapshiftschangerequest-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-swapshiftschangerequest-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var swapShiftsChangeRequest = await graphClient.Teams["{teamId}"].Schedule.SwapShiftsChangeRequests["{swapShiftsChangeRequestId}"]
+var swapShiftsChangeRequests = await graphClient.Teams["{teamId}"].Schedule.SwapShiftsChangeRequests
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-todotask-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-todotask-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var todoTask = await graphClient.Me.Todo.Lists["AAMkADA1MTHgwAAA="].Tasks["721a35e2-35e2-721a-e235-1a72e2351a72"]
+var tasks = await graphClient.Me.Todo.Lists["35e2-35e2-721a-e235-1a72e2351a7"].Tasks
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/get-todotasklist-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/get-todotasklist-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var lists = await graphClient.Me.Todo.Lists
+var todoTaskList = await graphClient.Me.Todo.Lists["AAMkADIyAAAAABrJAAA="]
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/group-create-approleassignment-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/group-create-approleassignment-csharp-snippets.md
@@ -13,7 +13,7 @@ var appRoleAssignment = new AppRoleAssignment
AppRoleId = Guid.Parse("appRoleId-value") };
-await graphClient.ServicePrincipals["{id}"].AppRoleAssignments
+await graphClient.Groups["{id}"].AppRoleAssignments
.Request() .AddAsync(appRoleAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/list-permission-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/list-permission-csharp-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permissions = await graphClient.Sites["{sitesId}"].Permissions
+ .Request()
+ .GetAsync();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/shift-get-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/shift-get-csharp-snippets.md
@@ -6,8 +6,43 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var shiftPreferences = await graphClient.Users["871dbd5c-3a6a-4392-bfe1-042452793a50"].ShiftPreferences
+var shiftPreferences = new ShiftPreferences
+{
+ Id = "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7",
+ Availability = new List<ShiftAvailability>()
+ {
+ new ShiftAvailability
+ {
+ Recurrence = new PatternedRecurrence
+ {
+ Pattern = new RecurrencePattern
+ {
+ Type = RecurrencePatternType.Weekly,
+ DaysOfWeek = new List<DayOfWeek>()
+ {
+ DayOfWeek.Monday,
+ DayOfWeek.Wednesday,
+ DayOfWeek.Friday
+ },
+ Interval = 1
+ },
+ Range = new RecurrenceRange
+ {
+ Type = RecurrenceRangeType.NoEnd
+ }
+ },
+ TimeZone = "Pacific Standard Time",
+ TimeSlots = null
+ }
+ },
+ AdditionalData = new Dictionary<string, object>()
+ {
+ {"@odata.etag", "1a371e53-f0a6-4327-a1ee-e3c56e4b38aa"}
+ }
+};
+
+await graphClient.Users["871dbd5c-3a6a-4392-bfe1-042452793a50"].Settings.ShiftPreferences
.Request()
- .GetAsync();
+ .UpdateAsync(shiftPreferences);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/update-page-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/update-page-csharp-snippets.md
@@ -6,27 +6,25 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var stream = new List<Stream>()
-{
- new Stream
- {
- Target = "#para-id",
- Action = "insert",
- Position = "before",
- Content = "<img src=\"image-url-or-part-name\" alt=\"image-alt-text\" />"
- },
- new Stream
- {
- Target = "#list-id",
- Action = "append",
- Content = "<li>new-page-content</li>"
- }
-};
+var stream = new System.IO.MemoryStream(Encoding.UTF8.GetBytes(@"[
+ {
+ 'target':'#para-id',
+ 'action':'insert',
+ 'position':'before',
+ 'content':'<img src=""image-url-or-part-name"" alt=""image-alt-text"" />'
+ },
+ {
+ 'target':'#list-id',
+ 'action':'append',
+ 'content':'<li>new-page-content</li>'
+ }
+]
+"));
var pages = new OnenotePage();
-pages.Content = content;
+pages.Content = stream;
-await graphClient.Me.Onenote.Pages["{id}"].Content
+await graphClient.Me.Onenote.Pages["{id}"]
.Request() .UpdateAsync(pages);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/update-permission-from--csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/update-permission-from--csharp-snippets.md
@@ -0,0 +1,21 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```csharp
+
+GraphServiceClient graphClient = new GraphServiceClient( authProvider );
+
+var permission = new Permission
+{
+ Roles = new List<String>()
+ {
+ "read"
+ }
+};
+
+await graphClient.Sites["{sitesId}"].Permissions["{permissionId}"]
+ .Request()
+ .UpdateAsync(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/csharp/user-list-teamsapps-csharp-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/csharp/user-list-teamsapps-csharp-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
-var userScopeTeamsAppInstallation = await graphClient.Users["5b649834-7412-4cce-9e69-176e95a394f5"].Teamwork.InstalledApps["NWI2NDk4MzQtNzQxMi00Y2NlLTllNjktMTc2ZTk1YTM5NGY1IyNhNmI2MzM2NS0zMWE0LTRmNDMtOTJlYy03MTBiNzE1NTdhZjk"]
+var installedApps = await graphClient.Users["5b649834-7412-4cce-9e69-176e95a394f5"].Teamwork.InstalledApps
.Request() .GetAsync();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/call-answer-service-hosted-media-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/call-answer-service-hosted-media-java-snippets.md
@@ -0,0 +1,31 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+String callbackUri = "https://bot.contoso.com/api/calls";
+
+LinkedList<Modality> acceptedModalitiesList = new LinkedList<Modality>();
+acceptedModalitiesList.add(Modality.AUDIO);
+
+ServiceHostedMediaConfig mediaConfig = new ServiceHostedMediaConfig();
+LinkedList<MediaInfo> preFetchMediaList = new LinkedList<MediaInfo>();
+MediaInfo preFetchMedia = new MediaInfo();
+preFetchMedia.uri = "https://cdn.contoso.com/beep.wav";
+preFetchMedia.resourceId = "1D6DE2D4-CD51-4309-8DAA-70768651088E";
+preFetchMediaList.add(preFetchMedia);
+MediaInfo preFetchMedia1 = new MediaInfo();
+preFetchMedia1.uri = "https://cdn.contoso.com/cool.wav";
+preFetchMedia1.resourceId = "1D6DE2D4-CD51-4309-8DAA-70768651088F";
+preFetchMediaList.add(preFetchMedia1);
+mediaConfig.preFetchMedia = preFetchMediaList;
+
+graphClient.communications().calls("57DAB8B1894C409AB240BD8BEAE78896")
+ .answer(callbackUri,mediaConfig,acceptedModalitiesList)
+ .buildRequest()
+ .post();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-directoryobject-from-device-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/create-directoryobject-from-device-java-snippets.md
@@ -9,7 +9,7 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
DirectoryObject directoryObject = new DirectoryObject(); directoryObject.id = "{id}";
-graphClient.devices("{id}").registeredOwners().references()
+graphClient.devices("{id}").registeredUsers().references()
.buildRequest() .post(directoryObject);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-educationclass-from-educationschool-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/create-educationclass-from-educationschool-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.education().schools("{school-id}").users("{user-id}")
+graphClient.education().classes("{class-id}").teachers("{teacher-id}")
.buildRequest() .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/create-permission-from--java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/create-permission-from--java-snippets.md
@@ -0,0 +1,26 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Permission permission = new Permission();
+LinkedList<String> rolesList = new LinkedList<String>();
+rolesList.add("write");
+permission.roles = rolesList;
+LinkedList<IdentitySet> grantedToIdentitiesList = new LinkedList<IdentitySet>();
+IdentitySet grantedToIdentities = new IdentitySet();
+Identity application = new Identity();
+application.id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e";
+application.displayName = "Foo App";
+grantedToIdentities.application = application;
+grantedToIdentitiesList.add(grantedToIdentities);
+permission.grantedToIdentities = grantedToIdentitiesList;
+
+graphClient.sites("{sitesId}").permissions()
+ .buildRequest()
+ .post(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/delete-permission-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/delete-permission-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-graphClient.me().drive().items("{item-id}").permissions("{perm-id}")
+graphClient.sites("{sitesId}").permissions("{permissionId}")
.buildRequest() .delete();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-a-count-endswith-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-a-count-endswith-java-snippets.md
@@ -11,8 +11,8 @@ requestOptions.add(new HeaderOption("ConsistencyLevel", "eventual"));
IUserCollectionPage users = graphClient.users() .buildRequest( requestOptions )
- .filter("endswith(mail,'a@contoso.com'),")
- .orderBy("userPrincipalName ")
+ .filter("endswith(mail,'a@contoso.com')")
+ .orderBy("userPrincipalName")
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-buckets-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-buckets-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IPlannerBucketCollectionPage buckets = graphClient.planner().plans("{plan-id}").buckets()
+IPlannerBucketCollectionPage buckets = graphClient.planner().buckets()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-classes-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-classes-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IEducationClassCollectionPage classes = graphClient.education().classes()
+IEducationClassCollectionWithReferencesPage classes = graphClient.education().schools("{school-id}").classes()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-contract-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-contract-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-Contract contract = graphClient.contracts("{id}")
+IContractCollectionPage contracts = graphClient.contracts()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-directoryaudit-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-directoryaudit-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IDirectoryAuditCollectionPage directoryAudits = graphClient.auditLogs().directoryAudits()
+DirectoryAudit directoryAudit = graphClient.auditLogs().directoryAudits("{id}")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-educationuser-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-educationuser-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-EducationUser educationUser = graphClient.education().users("{user-id}")
+User user = graphClient.education().me().user()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-grouplifecyclepolicy-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-grouplifecyclepolicy-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IGroupLifecyclePolicyCollectionPage groupLifecyclePolicies = graphClient.groupLifecyclePolicies()
+GroupLifecyclePolicy groupLifecyclePolicy = graphClient.groupLifecyclePolicies("{id}")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-mailboxsettings-1-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-mailboxsettings-1-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+MailboxSettings mailboxSettings = graphClient.customRequest("/me/mailboxSettings", MailboxSettings.class)
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-opentypeextension-3-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-opentypeextension-3-java-snippets.md
@@ -8,7 +8,6 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
Message message = graphClient.me().messages("AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===") .buildRequest()
- .filter("id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')")
.expand("extensions($filter=id%20eq%20'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-permission-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-permission-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Permission permission = graphClient.sites("{sitesId}").permissions("{permissionId}")
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-plans-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-plans-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-IPlannerPlanCollectionPage plans = graphClient.planner().plans()
+IPlannerPlanCollectionPage plans = graphClient.me().planner().plans()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-singlevaluelegacyextendedproperty-1-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-singlevaluelegacyextendedproperty-1-java-snippets.md
@@ -8,7 +8,6 @@ IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationPro
Message message = graphClient.me().messages("AAMkAGE1M2_bs88AACHsLqWAAA=") .buildRequest()
- .filter("id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color')")
.expand("singleValueExtendedProperties($filter=id%20eq%20'String%20%7B66f5a359-4659-4830-9070-00047ec6ac6e%7D%20Name%20Color')") .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-swapshiftschangerequest-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-swapshiftschangerequest-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-SwapShiftsChangeRequest swapShiftsChangeRequest = graphClient.teams("{teamId}").schedule().swapShiftsChangeRequests("{swapShiftsChangeRequestId}")
+ISwapShiftsChangeRequestCollectionPage swapShiftsChangeRequests = graphClient.teams("{teamId}").schedule().swapShiftsChangeRequests()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-todotask-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-todotask-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-TodoTask todoTask = graphClient.me().todo().lists("AAMkADA1MTHgwAAA=").tasks("721a35e2-35e2-721a-e235-1a72e2351a72")
+ITodoTaskCollectionPage tasks = graphClient.me().todo().lists("35e2-35e2-721a-e235-1a72e2351a7").tasks()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/get-todotasklist-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/get-todotasklist-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-ITodoTaskListCollectionPage lists = graphClient.me().todo().lists()
+TodoTaskList todoTaskList = graphClient.me().todo().lists("AAMkADIyAAAAABrJAAA=")
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/group-create-approleassignment-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/group-create-approleassignment-java-snippets.md
@@ -11,7 +11,7 @@ appRoleAssignment.principalId = UUID.fromString("principalId-value");
appRoleAssignment.resourceId = UUID.fromString("resourceId-value"); appRoleAssignment.appRoleId = UUID.fromString("appRoleId-value");
-graphClient.servicePrincipals("{id}").appRoleAssignments()
+graphClient.groups("{id}").appRoleAssignments()
.buildRequest() .post(appRoleAssignment);
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/list-permission-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/list-permission-java-snippets.md
@@ -0,0 +1,13 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+IPermissionCollectionPage permissions = graphClient.sites("{sitesId}").permissions()
+ .buildRequest()
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/shift-get-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/shift-get-java-snippets.md
@@ -6,8 +6,32 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-Content shiftPreferences = graphClient.users("871dbd5c-3a6a-4392-bfe1-042452793a50").shiftPreferences()
+ShiftPreferences shiftPreferences = new ShiftPreferences();
+shiftPreferences.id = "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7";
+shiftPreferences.additionalDataManager().put("@odata.etag", new JsonPrimitive("1a371e53-f0a6-4327-a1ee-e3c56e4b38aa"));
+LinkedList<ShiftAvailability> availabilityList = new LinkedList<ShiftAvailability>();
+ShiftAvailability availability = new ShiftAvailability();
+PatternedRecurrence recurrence = new PatternedRecurrence();
+RecurrencePattern pattern = new RecurrencePattern();
+pattern.type = RecurrencePatternType.WEEKLY;
+LinkedList<DayOfWeek> daysOfWeekList = new LinkedList<DayOfWeek>();
+daysOfWeekList.add(DayOfWeek.MONDAY);
+daysOfWeekList.add(DayOfWeek.WEDNESDAY);
+daysOfWeekList.add(DayOfWeek.FRIDAY);
+pattern.daysOfWeek = daysOfWeekList;
+pattern.interval = 1;
+recurrence.pattern = pattern;
+RecurrenceRange range = new RecurrenceRange();
+range.type = RecurrenceRangeType.NO_END;
+recurrence.range = range;
+availability.recurrence = recurrence;
+availability.timeZone = "Pacific Standard Time";
+availability.timeSlots = null;
+availabilityList.add(availability);
+shiftPreferences.availability = availabilityList;
+
+graphClient.users("871dbd5c-3a6a-4392-bfe1-042452793a50").settings().shiftPreferences()
.buildRequest()
- .get();
+ .patch(shiftPreferences);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/update-permission-from--java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/update-permission-from--java-snippets.md
@@ -0,0 +1,18 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```java
+
+IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
+
+Permission permission = new Permission();
+LinkedList<String> rolesList = new LinkedList<String>();
+rolesList.add("read");
+permission.roles = rolesList;
+
+graphClient.sites("{sitesId}").permissions("{permissionId}")
+ .buildRequest()
+ .patch(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/java/user-list-teamsapps-java-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/java/user-list-teamsapps-java-snippets.md
@@ -6,7 +6,7 @@ description: "Automatically generated file. DO NOT MODIFY"
IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
-UserScopeTeamsAppInstallation userScopeTeamsAppInstallation = graphClient.users("5b649834-7412-4cce-9e69-176e95a394f5").teamwork().installedApps("NWI2NDk4MzQtNzQxMi00Y2NlLTllNjktMTc2ZTk1YTM5NGY1IyNhNmI2MzM2NS0zMWE0LTRmNDMtOTJlYy03MTBiNzE1NTdhZjk")
+IUserScopeTeamsAppInstallationCollectionPage installedApps = graphClient.users("5b649834-7412-4cce-9e69-176e95a394f5").teamwork().installedApps()
.buildRequest() .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/call-answer-service-hosted-media-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/call-answer-service-hosted-media-javascript-snippets.md
@@ -0,0 +1,34 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const answer = {
+ callbackUri: "https://bot.contoso.com/api/calls",
+ acceptedModalities: [ "audio" ],
+ mediaConfig: {
+ @odata.type: "#microsoft.graph.serviceHostedMediaConfig",
+ preFetchMedia: [
+ {
+ uri: "https://cdn.contoso.com/beep.wav",
+ resourceId: "1D6DE2D4-CD51-4309-8DAA-70768651088E"
+ },
+ {
+ uri: "https://cdn.contoso.com/cool.wav",
+ resourceId: "1D6DE2D4-CD51-4309-8DAA-70768651088F"
+ }
+ ]
+ }
+};
+
+let res = await client.api('/communications/calls/57DAB8B1894C409AB240BD8BEAE78896/answer')
+ .post(answer);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-directoryobject-from-device-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/create-directoryobject-from-device-javascript-snippets.md
@@ -14,7 +14,7 @@ const directoryObject = {
@odata.id: "https://graph.microsoft.com/v1.0/directoryObjects/{id}" };
-let res = await client.api('/devices/{id}/registeredOwners/$ref')
+let res = await client.api('/devices/{id}/registeredUsers/$ref')
.post(directoryObject); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-educationclass-from-educationschool-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/create-educationclass-from-educationschool-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/schools/{school-id}/users/{user-id}')
+let res = await client.api('/education/classes/{class-id}/teachers/{teacher-id}')
.delete(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-item-attachment-with-post-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/create-item-attachment-with-post-javascript-snippets.md
@@ -0,0 +1,45 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const reply = {
+ post: {
+ body: {
+ contentType: "text",
+ content: "I attached an event."
+ },
+ attachments: [{
+ @odata.type: "#microsoft.graph.itemAttachment",
+ name: "Holiday event",
+ item: {
+ @odata.type: "microsoft.graph.event",
+ subject: "Discuss gifts for children",
+ body: {
+ contentType: "HTML",
+ content: "Let's look for funding!"
+ },
+ start: {
+ dateTime: "2019-12-02T18:00:00",
+ timeZone: "Pacific Standard Time"
+ },
+ end: {
+ dateTime: "2019-12-02T19:00:00",
+ timeZone: "Pacific Standard Time"
+ }
+ }
+ } ]
+ }
+};
+
+let res = await client.api('/groups/1848753d-185d-4c08-a4e4-6ee40521d115/threads/AAQkADJUdfolA==/reply')
+ .post(reply);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/create-permission-from--javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/create-permission-from--javascript-snippets.md
@@ -0,0 +1,26 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const permission = {
+ roles: ["write"],
+ grantedToIdentities: [{
+ application: {
+ id: "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
+ displayName: "Foo App"
+ }
+ }]
+};
+
+let res = await client.api('/sites/{sitesId}/permissions')
+ .post(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/delete-permission-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/delete-permission-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/drive/items/{item-id}/permissions/{perm-id}')
+let res = await client.api('/sites/{sitesId}/permissions/{permissionId}')
.delete(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-a-count-endswith-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-a-count-endswith-javascript-snippets.md
@@ -12,8 +12,8 @@ const client = Client.init(options);
let res = await client.api('/users') .header('ConsistencyLevel','eventual')
- .filter('endswith(mail,'a@contoso.com'),')
- .orderby('userPrincipalName ')
+ .filter('endswith(mail,'a@contoso.com')')
+ .orderby('userPrincipalName')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-buckets-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-buckets-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/planner/plans/{plan-id}/buckets')
+let res = await client.api('/planner/buckets')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-classes-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-classes-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/classes')
+let res = await client.api('/education/schools/{school-id}/classes')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-contract-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-contract-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/contracts/{id}')
+let res = await client.api('/contracts')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-directoryaudit-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-directoryaudit-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/auditLogs/directoryAudits')
+let res = await client.api('/auditLogs/directoryAudits/{id}')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-educationuser-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-educationuser-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/education/users/{user-id}')
+let res = await client.api('/education/me/user')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-grouplifecyclepolicy-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-grouplifecyclepolicy-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/groupLifecyclePolicies')
+let res = await client.api('/groupLifecyclePolicies/{id}')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-mailboxsettings-1-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-mailboxsettings-1-javascript-snippets.md
@@ -0,0 +1,16 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/me/mailboxSettings')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-opentypeextension-3-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-opentypeextension-3-javascript-snippets.md
@@ -11,7 +11,6 @@ const options = {
const client = Client.init(options); let res = await client.api('/me/messages/AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')
- .filter('id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')')
.expand('extensions($filter=id%20eq%20'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-permission-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-permission-javascript-snippets.md
@@ -0,0 +1,16 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/sites/{sitesId}/permissions/{permissionId}')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-plans-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-plans-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/planner/plans')
+let res = await client.api('/me/planner/plans')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-singlevaluelegacyextendedproperty-1-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-singlevaluelegacyextendedproperty-1-javascript-snippets.md
@@ -11,7 +11,6 @@ const options = {
const client = Client.init(options); let res = await client.api('/me/messages/AAMkAGE1M2_bs88AACHsLqWAAA=')
- .filter('id eq 'String {66f5a359-4659-4830-9070-00047ec6ac6e} Name Color')')
.expand('singleValueExtendedProperties($filter=id%20eq%20'String%20%7B66f5a359-4659-4830-9070-00047ec6ac6e%7D%20Name%20Color')') .get();
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-swapshiftschangerequest-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-swapshiftschangerequest-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/teams/{teamId}/schedule/swapShiftsChangeRequests/{swapShiftsChangeRequestId}')
+let res = await client.api('/teams/{teamId}/schedule/swapShiftsChangeRequests')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-todotask-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-todotask-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/todo/lists/AAMkADA1MTHgwAAA=/tasks/721a35e2-35e2-721a-e235-1a72e2351a72')
+let res = await client.api('/me/todo/lists/35e2-35e2-721a-e235-1a72e2351a7/tasks')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/get-todotasklist-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/get-todotasklist-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/me/todo/lists')
+let res = await client.api('/me/todo/lists/AAMkADIyAAAAABrJAAA=')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/group-create-approleassignment-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/group-create-approleassignment-javascript-snippets.md
@@ -16,7 +16,7 @@ const appRoleAssignment = {
appRoleId: "appRoleId-value" };
-let res = await client.api('/servicePrincipals/{id}/appRoleAssignments')
+let res = await client.api('/groups/{id}/appRoleAssignments')
.post(appRoleAssignment); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/list-permission-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/list-permission-javascript-snippets.md
@@ -0,0 +1,16 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+let res = await client.api('/sites/{sitesId}/permissions')
+ .get();
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/shift-get-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/shift-get-javascript-snippets.md
@@ -10,7 +10,28 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/users/871dbd5c-3a6a-4392-bfe1-042452793a50/shiftPreferences')
- .get();
+const shiftPreferences = {
+ id: "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7",
+ @odata.etag: "1a371e53-f0a6-4327-a1ee-e3c56e4b38aa",
+ availability: [
+ {
+ recurrence: {
+ pattern: {
+ type: "Weekly",
+ daysOfWeek: ["Monday", "Wednesday", "Friday"],
+ interval: 1
+ },
+ range: {
+ type: "noEnd"
+ }
+ },
+ timeZone: "Pacific Standard Time",
+ timeSlots: null
+ }
+ ]
+};
+
+let res = await client.api('/users/871dbd5c-3a6a-4392-bfe1-042452793a50/settings/shiftPreferences')
+ .update(shiftPreferences);
```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/update-permission-from--javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/update-permission-from--javascript-snippets.md
@@ -0,0 +1,20 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```javascript
+
+const options = {
+ authProvider,
+};
+
+const client = Client.init(options);
+
+const permission = {
+ roles: ["read"]
+};
+
+let res = await client.api('/sites/{sitesId}/permissions/{permissionId}')
+ .update(permission);
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/javascript/user-list-teamsapps-javascript-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/javascript/user-list-teamsapps-javascript-snippets.md
@@ -10,7 +10,7 @@ const options = {
const client = Client.init(options);
-let res = await client.api('/users/5b649834-7412-4cce-9e69-176e95a394f5/teamwork/installedApps/NWI2NDk4MzQtNzQxMi00Y2NlLTllNjktMTc2ZTk1YTM5NGY1IyNhNmI2MzM2NS0zMWE0LTRmNDMtOTJlYy03MTBiNzE1NTdhZjk')
+let res = await client.api('/users/5b649834-7412-4cce-9e69-176e95a394f5/teamwork/installedApps')
.get(); ```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/call-answer-service-hosted-media-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/call-answer-service-hosted-media-objc-snippets.md
@@ -0,0 +1,48 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/communications/calls/57DAB8B1894C409AB240BD8BEAE78896/answer"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
+
+NSString *callbackUri = @"https://bot.contoso.com/api/calls";
+payloadDictionary[@"callbackUri"] = callbackUri;
+
+NSMutableArray *acceptedModalitiesList = [[NSMutableArray alloc] init];
+[acceptedModalitiesList addObject: @"audio"];
+payloadDictionary[@"acceptedModalities"] = acceptedModalitiesList;
+
+MSGraphMediaConfig *mediaConfig = [[MSGraphMediaConfig alloc] init];
+NSMutableArray *preFetchMediaList = [[NSMutableArray alloc] init];
+MSGraphMediaInfo *preFetchMedia = [[MSGraphMediaInfo alloc] init];
+[preFetchMedia setUri:@"https://cdn.contoso.com/beep.wav"];
+[preFetchMedia setResourceId:@"1D6DE2D4-CD51-4309-8DAA-70768651088E"];
+[preFetchMediaList addObject: preFetchMedia];
+MSGraphMediaInfo *preFetchMedia = [[MSGraphMediaInfo alloc] init];
+[preFetchMedia setUri:@"https://cdn.contoso.com/cool.wav"];
+[preFetchMedia setResourceId:@"1D6DE2D4-CD51-4309-8DAA-70768651088F"];
+[preFetchMediaList addObject: preFetchMedia];
+[mediaConfig setPreFetchMedia:preFetchMediaList];
+payloadDictionary[@"mediaConfig"] = mediaConfig;
+
+NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
+[urlRequest setHTTPBody:data];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-directoryobject-from-device-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/create-directoryobject-from-device-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/devices/{id}/registeredOwners/$ref"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/devices/{id}/registeredUsers/$ref"]]];
[urlRequest setHTTPMethod:@"POST"]; [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-educationclass-from-educationschool-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/create-educationclass-from-educationschool-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/schools/{school-id}/users/{user-id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/classes/{class-id}/teachers/{teacher-id}"]]];
[urlRequest setHTTPMethod:@"DELETE"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-item-attachment-with-post-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/create-item-attachment-with-post-objc-snippets.md
@@ -0,0 +1,55 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/1848753d-185d-4c08-a4e4-6ee40521d115/threads/AAQkADJUdfolA==/reply"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
+
+MSGraphPost *post = [[MSGraphPost alloc] init];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType text]];
+[body setContent:@"I attached an event."];
+[post setBody:body];
+NSMutableArray *attachmentsList = [[NSMutableArray alloc] init];
+MSGraphAttachment *attachments = [[MSGraphAttachment alloc] init];
+[attachments setName:@"Holiday event"];
+MSGraphOutlookItem *item = [[MSGraphOutlookItem alloc] init];
+[item setSubject:@"Discuss gifts for children"];
+MSGraphItemBody *body = [[MSGraphItemBody alloc] init];
+[body setContentType: [MSGraphBodyType html]];
+[body setContent:@"Let's look for funding!"];
+[item setBody:body];
+MSGraphDateTimeTimeZone *start = [[MSGraphDateTimeTimeZone alloc] init];
+[start setDateTime: "2019-12-02T18:00:00"];
+[start setTimeZone:@"Pacific Standard Time"];
+[item setStart:start];
+MSGraphDateTimeTimeZone *end = [[MSGraphDateTimeTimeZone alloc] init];
+[end setDateTime: "2019-12-02T19:00:00"];
+[end setTimeZone:@"Pacific Standard Time"];
+[item setEnd:end];
+[attachments setItem:item];
+[attachmentsList addObject: attachments];
+[post setAttachments:attachmentsList];
+payloadDictionary[@"post"] = post;
+
+NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
+[urlRequest setHTTPBody:data];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/create-permission-from--objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/create-permission-from--objc-snippets.md
@@ -0,0 +1,40 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions"]]];
+[urlRequest setHTTPMethod:@"POST"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphPermission *permission = [[MSGraphPermission alloc] init];
+NSMutableArray *rolesList = [[NSMutableArray alloc] init];
+[rolesList addObject: @"write"];
+[permission setRoles:rolesList];
+NSMutableArray *grantedToIdentitiesList = [[NSMutableArray alloc] init];
+MSGraphIdentitySet *grantedToIdentities = [[MSGraphIdentitySet alloc] init];
+MSGraphIdentity *application = [[MSGraphIdentity alloc] init];
+[application setId:@"89ea5c94-7736-4e25-95ad-3fa95f62b66e"];
+[application setDisplayName:@"Foo App"];
+[grantedToIdentities setApplication:application];
+[grantedToIdentitiesList addObject: grantedToIdentities];
+[permission setGrantedToIdentities:grantedToIdentitiesList];
+
+NSError *error;
+NSData *permissionData = [permission getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:permissionData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/delete-permission-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/delete-permission-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/drive/items/{item-id}/permissions/{perm-id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions/{permissionId}"]]];
[urlRequest setHTTPMethod:@"DELETE"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-buckets-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-buckets-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/planner/plans/{plan-id}/buckets"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/planner/buckets"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-classes-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-classes-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/classes"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/schools/{school-id}/classes"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-contract-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-contract-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/contracts/{id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/contracts"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphContract *contract = [[MSGraphContract alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphContract *contract = [[MSGraphContract alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-directoryaudit-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-directoryaudit-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/auditLogs/directoryAudits"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/auditLogs/directoryAudits/{id}"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphDirectoryAudit *directoryAudit = [[MSGraphDirectoryAudit alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphDirectoryAudit *directoryAudit = [[MSGraphDirectoryAudit alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-educationuser-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-educationuser-objc-snippets.md
@@ -7,13 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/users/{user-id}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/me/user"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphEducationUser *educationUser = [[MSGraphEducationUser alloc] initWithData:data error:&nserror];
+ MSGraphUser *user = [[MSGraphUser alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-grouplifecyclepolicy-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-grouplifecyclepolicy-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groupLifecyclePolicies"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groupLifecyclePolicies/{id}"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphGroupLifecyclePolicy *groupLifecyclePolicy = [[MSGraphGroupLifecyclePolicy alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphGroupLifecyclePolicy *groupLifecyclePolicy = [[MSGraphGroupLifecyclePolicy alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-mailboxsettings-1-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-mailboxsettings-1-objc-snippets.md
@@ -0,0 +1,22 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/mailboxSettings"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ MSGraphMailboxSettings *mailboxSettings = [[MSGraphMailboxSettings alloc] initWithData:data error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-permission-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-permission-objc-snippets.md
@@ -0,0 +1,22 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions/{permissionId}"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ MSGraphPermission *permission = [[MSGraphPermission alloc] initWithData:data error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-plans-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-plans-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/planner/plans"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/planner/plans"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-swapshiftschangerequest-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-swapshiftschangerequest-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/teams/{teamId}/schedule/swapShiftsChangeRequests/{swapShiftsChangeRequestId}"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/teams/{teamId}/schedule/swapShiftsChangeRequests"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphSwapShiftsChangeRequest *swapShiftsChangeRequest = [[MSGraphSwapShiftsChangeRequest alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphSwapShiftsChangeRequest *swapShiftsChangeRequest = [[MSGraphSwapShiftsChangeRequest alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-todotask-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-todotask-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists/AAMkADA1MTHgwAAA=/tasks/721a35e2-35e2-721a-e235-1a72e2351a72"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists/35e2-35e2-721a-e235-1a72e2351a7/tasks"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphTodoTask *todoTask = [[MSGraphTodoTask alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphTodoTask *todoTask = [[MSGraphTodoTask alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/get-todotasklist-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/get-todotasklist-objc-snippets.md
@@ -7,15 +7,13 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/todo/lists/AAMkADIyAAAAABrJAAA="]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- NSError *jsonError = nil;
- MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
- MSGraphTodoTaskList *todoTaskList = [[MSGraphTodoTaskList alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+ MSGraphTodoTaskList *todoTaskList = [[MSGraphTodoTaskList alloc] initWithData:data error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/group-create-approleassignment-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/group-create-approleassignment-objc-snippets.md
@@ -7,7 +7,7 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/servicePrincipals/{id}/appRoleAssignments"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/groups/{id}/appRoleAssignments"]]];
[urlRequest setHTTPMethod:@"POST"]; [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/list-permission-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/list-permission-objc-snippets.md
@@ -0,0 +1,24 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions"]]];
+[urlRequest setHTTPMethod:@"GET"];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphPermission *permission = [[MSGraphPermission alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/shift-get-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/shift-get-objc-snippets.md
@@ -7,13 +7,41 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/871dbd5c-3a6a-4392-bfe1-042452793a50/shiftPreferences"]]];
-[urlRequest setHTTPMethod:@"GET"];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/871dbd5c-3a6a-4392-bfe1-042452793a50/settings/shiftPreferences"]]];
+[urlRequest setHTTPMethod:@"PATCH"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphShiftPreferences *shiftPreferences = [[MSGraphShiftPreferences alloc] init];
+[shiftPreferences setId:@"SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7"];
+NSMutableArray *availabilityList = [[NSMutableArray alloc] init];
+MSGraphShiftAvailability *availability = [[MSGraphShiftAvailability alloc] init];
+MSGraphPatternedRecurrence *recurrence = [[MSGraphPatternedRecurrence alloc] init];
+MSGraphRecurrencePattern *pattern = [[MSGraphRecurrencePattern alloc] init];
+[pattern setType: [MSGraphRecurrencePatternType weekly]];
+NSMutableArray *daysOfWeekList = [[NSMutableArray alloc] init];
+[daysOfWeekList addObject: @"Monday"];
+[daysOfWeekList addObject: @"Wednesday"];
+[daysOfWeekList addObject: @"Friday"];
+[pattern setDaysOfWeek:daysOfWeekList];
+[pattern setInterval: 1];
+[recurrence setPattern:pattern];
+MSGraphRecurrenceRange *range = [[MSGraphRecurrenceRange alloc] init];
+[range setType: [MSGraphRecurrenceRangeType noEnd]];
+[recurrence setRange:range];
+[availability setRecurrence:recurrence];
+[availability setTimeZone:@"Pacific Standard Time"];
+[availability setTimeSlots: null];
+[availabilityList addObject: availability];
+[shiftPreferences setAvailability:availabilityList];
+
+NSError *error;
+NSData *shiftPreferencesData = [shiftPreferences getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:shiftPreferencesData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphShiftPreferences *shiftPreferences = [[MSGraphShiftPreferences alloc] initWithData:data error:&nserror];
+ //Request Completed
}];
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/update-permission-from--objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/update-permission-from--objc-snippets.md
@@ -0,0 +1,32 @@
+
+description: "Automatically generated file. DO NOT MODIFY"
++
+```objc
+
+MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
+
+NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/sites/{sitesId}/permissions/{permissionId}"]]];
+[urlRequest setHTTPMethod:@"PATCH"];
+[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+
+MSGraphPermission *permission = [[MSGraphPermission alloc] init];
+NSMutableArray *rolesList = [[NSMutableArray alloc] init];
+[rolesList addObject: @"read"];
+[permission setRoles:rolesList];
+
+NSError *error;
+NSData *permissionData = [permission getSerializedDataWithError:&error];
+[urlRequest setHTTPBody:permissionData];
+
+MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
+ completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
+
+ //Request Completed
+
+}];
+
+[meDataTask execute];
+
+```
v1.0 https://docs.microsoft.com/en-us/graph/includes/snippets/objc/user-list-teamsapps-objc-snippets https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/includes/snippets/objc/user-list-teamsapps-objc-snippets.md
@@ -7,13 +7,15 @@ description: "Automatically generated file. DO NOT MODIFY"
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider]; NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
-NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/5b649834-7412-4cce-9e69-176e95a394f5/teamwork/installedApps/NWI2NDk4MzQtNzQxMi00Y2NlLTllNjktMTc2ZTk1YTM5NGY1IyNhNmI2MzM2NS0zMWE0LTRmNDMtOTJlYy03MTBiNzE1NTdhZjk"]]];
+NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/5b649834-7412-4cce-9e69-176e95a394f5/teamwork/installedApps"]]];
[urlRequest setHTTPMethod:@"GET"]; MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
- MSGraphUserScopeTeamsAppInstallation *userScopeTeamsAppInstallation = [[MSGraphUserScopeTeamsAppInstallation alloc] initWithData:data error:&nserror];
+ NSError *jsonError = nil;
+ MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
+ MSGraphUserScopeTeamsAppInstallation *userScopeTeamsAppInstallation = [[MSGraphUserScopeTeamsAppInstallation alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
v1.0 https://docs.microsoft.com/en-us/graph/resources/calendarpermission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/resources/calendarpermission.md
@@ -38,7 +38,7 @@ Once a sharee or delegate has been set up for a calendar, you can [update](../ap
### calendarRoleType values
-| Values | Description |
+| Member | Description |
|:--|:| | none | Calendar is not shared with the user. | | freeBusyRead | User is a sharee who can view free/busy status of the owner on the calendar. |
v1.0 https://docs.microsoft.com/en-us/graph/resources/group https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/resources/group.md
@@ -143,7 +143,7 @@ This resource supports:
|securityIdentifier|String|Security identifier of the group, used in Windows scenarios. <br><br>Returned by default.| |theme|String|Specifies an Microsoft 365 group's color theme. Possible values are `Teal`, `Purple`, `Green`, `Blue`, `Pink`, `Orange` or `Red`. <br><br>Returned by default. | |unseenCount|Int32|Count of conversations that have received new posts since the signed-in user last visited the group. <br><br>Returned only on $select. |
-|visibility|String| Specifies the visibility of a Microsoft 365 group. Possible values are: `Private`, `Public`, or `Hiddenmembership`; blank values are treated as public. See [group visibility options](#group-visibility-options) to learn more.<br>Visibility can be set only when a group is created; it is not editable.<br>Visibility is supported only for unified groups; it is not supported for security groups. <br><br>Returned by default.|
+|visibility|String| Specifies the group join policy and group content visibility for groups. Possible values are: `Private`, `Public`, or `Hiddenmembership`. `Hiddenmembership` can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation.<br> If visibility value is not specified during group creation on Microsoft Graph, a security group is created as `Private` by default and Microsoft 365 group is `Public`. See [group visibility options](#group-visibility-options) to learn more. <br><br>Returned by default.|
### Group visibility options
v1.0 https://docs.microsoft.com/en-us/graph/resources/permission https://github.com/microsoftgraph/microsoft-graph-docs/commits/master/api-reference/v1.0/resources/permission.md
@@ -80,7 +80,7 @@ Permissions with an [**invitation**][SharingInvitation] facet represent permissi
### Roles property values
-| Role | Details |
+| Value | Description |
|:|:-| | read | Provides the ability to read the metadata and contents of the item. | | write | Provides the ability to read and modify the metadata and contents of the item. |