Skip to content

Commit c7c83ae

Browse files
authored
Update long-running-operations.md
1 parent 55ffb89 commit c7c83ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

graph/patterns/long-running-operations.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ There are some deviations from the base guidelines where Microsoft Graph API sta
5757
- The API response says the operation resource is being created at the URL provided in the Location header and indicates that the request is not completed by including a 202 status code.
5858
- Microsoft Graph doesn’t allow tenant-wide operation resources; therefore, stepwise operations are often modeled as a navigation property on the target resource.
5959

60+
- For most implementations of the LRO pattern, there will be 3 permissions necessary to comply with the principle of least privilege: `{operation}.ReadWrite.All` to create the operation entity, `{operation.Read.All}` to track the operation entity to completion, and `{resource}.Read.All` to retrieve the resource that was created as a result of the operation.
61+
For APIs that would have been modeled as a simple `GET` on the resource URL, but that are modeled as long-running operations due to MSGraph performance requirements, only the `{resource}.Read.All` permission is necessary as long as creating the operation entity is "safe".
62+
Here, "safe" means that there are no side effects for creating the operation entity that would change the functioning of any entities outside of the resource being retrieved.
63+
This requirment is less strict than idempotence, and an idempotent API is suffucient to meet this requirement.
64+
6065
## When to use this pattern
6166

6267
Any API call that is expected to take longer than one second in the 99th percentile should use the long running operations pattern.
@@ -254,4 +259,4 @@ HTTP/1.1 202 Accepted
254259
255260
Location: https://graph.microsoft.com/v1.0/storage/operations/123
256261
257-
```
262+
```

0 commit comments

Comments
 (0)