Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Create a new fileStorageContainerTypeAppPermissionGrant object in a fileStorageContainerTypeRegistration.
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
| Permission type | Least privileged permission | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | FileStorageContainerTypeReg.Selected | FileStorageContainerTypeReg.Manage.All |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | FileStorageContainerTypeReg.Selected | Not available. |
Note:
- When delegated tokens are used, either the SharePoint Embedded admin role or the Global admin role is required.
- If the
FileStorageContainerTypeReg.Selectedpermission is used, changes are limited to registrations owned by the application that makes the call.
HTTP request
PUT /storage/fileStorage/containerTypeRegistrations/{fileStorageContainerTypeRegistrationId}/applicationPermissionGrants/{appId}
Request headers
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
Request body
In the request body, supply a JSON representation of the fileStorageContainerTypeAppPermissionGrant object. Don't include the appId in the body.
You can specify the following properties when you create a fileStorageContainerTypeAppPermissionGrant.
| Property | Type | Description |
|---|---|---|
| applicationPermissions | fileStorageContainerTypeAppPermission collection | Allowed permissions when you use application tokens. The possible values are: none, readContent, writeContent, manageContent, create, delete, read, write, enumeratePermissions, addPermissions, updatePermissions, deletePermissions, deleteOwnPermission, managePermissions, full, unknownFutureValue. Optional. |
| delegatedPermissions | fileStorageContainerTypeAppPermission collection | Allowed permissions when you use delegated tokens. The possible values are: none, readContent, writeContent, manageContent, create, delete, read, write, enumeratePermissions, addPermissions, updatePermissions, deletePermissions, deleteOwnPermission, managePermissions, full, unknownFutureValue. Optional. |
Response
If successful, this method returns a 201 Created response code and a fileStorageContainerTypeAppPermissionGrant object in the response body.
Examples
Request
The following example shows how to add a new permission grant to a registration.
PUT https://graph.microsoft.com/v1.0/storage/fileStorage/containerTypeRegistrations/33225700-9a00-4c00-84dd-0c210f203f01/applicationPermissionGrants/11335700-9a00-4c00-84dd-0c210f203f00
Content-Type: application/json
{
"delegatedPermissions": ["readContent", "writeContent"],
"applicationPermissions": ["full"]
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.fileStorageContainerTypeAppPermissionGrant",
"appId": "11335700-9a00-4c00-84dd-0c210f203f00",
"delegatedPermissions": ["readContent", "writeContent"],
"applicationPermissions": ["full"]
}