Skip to content

Commit 5647201

Browse files
committed
Update SPE CT registration page to use new CT Mgmt APIs
1 parent be302b7 commit 5647201

File tree

1 file changed

+75
-64
lines changed

1 file changed

+75
-64
lines changed

docs/embedded/getting-started/register-api-documentation.md

Lines changed: 75 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,49 @@
11
---
2-
title: Register File Storage container Type Application Permissions
2+
title: Register file storage container type application permissions
33
description: Register the container type.
4-
ms.date: 03/03/2025
4+
ms.date: 08/11/2025
55
ms.localizationpriority: high
66
---
77

88
# Register file storage container type application permissions
99

10-
In order for a SharePoint Embedded application to interact with containers in a consuming tenant, the container type must first be registered in the consuming tenant. Container type registration happens when the owning application invokes the registration API to specify what permissions can be performed against its container type. The registration API also grants access to other Guest Apps to interact with the owning application's containers. For example, a SharePoint Embedded application can grant permissions to another application--a Guest App so that the Guest App can perform backup operations against its containers.
10+
In order for a SharePoint Embedded application to interact with containers in a consuming tenant, the container type must first be registered in the consuming tenant. Container type registration happens when the owning application invokes the registration API to specify how applications can access its container type. The registration API also grants access to other Guest Apps to interact with the owning application's containers. For example, a SharePoint Embedded application can grant permissions to another application--a Guest App so that the Guest App can perform backup operations against its containers.
1111

12-
Since the registration API controls the permissions that a SharePoint Embedded application can perform against the container in the consuming tenant, this call should be one of the first APIs invoked. Failure to do so results in access denied errors when invoking other APIs against the container and/or the content in the containers.
12+
Since the [container type registration API](/graph/api/filestorage-post-containertyperegistrations) controls the access to a container type in the consuming tenant, it's the first endpoint invoked by a SharePoint Embedded application on a consuming tenant. Failure to do so results in access denied errors when invoking other APIs against containers and/or content in the containers.
1313

1414
There are no restrictions on how many times the registration API can be invoked. How often the registration API is invoked and when it's invoked is dependent on the SharePoint Embedded application. However, the last successful call to the registration API determines the settings used in the consuming tenant.
1515

1616
## Authentication and authorization requirements
1717

18-
For the container type's owning application to act on a consuming tenant, some pre-requisites must be completed:
18+
For the container type's owning application to act on a consuming tenant, some prerequisites must be completed:
1919

2020
- the owning app must have a service principal installed on the consuming tenant; and
2121
- the owning app must be granted admin consent to perform container type registration in the consuming tenant.
2222

23-
> [!NOTE]
24-
> Only the owning application of the container type can invoke the registration API in the consuming tenant.
25-
26-
Both requirements can be satisfied by having a tenant administrator of the consuming tenant [grant admin consent](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal) to the container type's owning application.
23+
You can satisfy these requirements by having the consuming tenant's Global Administrator [grant admin consent](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal) to the container type's owning application.
2724

28-
The container type registration API requires the `Container.Selected` app-only permission for SharePoint (see [Exceptional access patterns](../development/auth.md#exceptional-access-patterns)). You will need to use the [client credentials grant flow](/entra/identity-platform/v2-oauth2-client-creds-grant-flow) and [request a token with a certificate](/entra/identity-platform/v2-oauth2-client-creds-grant-flow#second-case-access-token-request-with-a-certificate) to use the registration API.
25+
The [container type registration API](/graph/api/filestorage-post-containertyperegistrations) requires the `FileStorageContainerTypeReg.Selected` user-delegated or app-only permission. When the owning application calls the container type registration API on behalf of a user, the user must be assigned the [SharePoint Embedded Administrator](/entra/identity/role-based-access-control/permissions-reference#sharepoint-embedded-administrator) or the [Global Administrator](/entra/identity/role-based-access-control/permissions-reference#global-administrator) roles. When the owning application calls the container type registration API without a user context, it needs to request a token using the [client credentials grant flow](/entra/identity-platform/v2-oauth2-client-creds-grant-flow).
2926

3027
> [!NOTE]
31-
> The registration API is **NOT** a Microsoft Graph API but a SharePoint API. This API will be ported to Microsoft Graph in the future.
28+
> The container type registration API is currently in preview and subject to change.
3229
3330
To request admin consent from a tenant administrator in the consuming tenant, you may direct them to the [admin consent endpoint](/entra/identity-platform/v2-admin-consent). For the right endpoints on national clouds, see [Microsoft identity platform endpoints on national clouds](/entra/identity-platform/authentication-national-cloud#microsoft-entra-authentication-endpoints):
3431

3532
```http
36-
https://login.microsoftonline.com/<ConsumingTenantID>/adminconsent?client_id=<OwningTenantClientID>
33+
https://login.microsoftonline.com/{ConsumingTenantId}/v2.0/adminconsent?client_id={OwningAppId}&scope=https://graph.microsoft.com/.default
3734
```
3835

3936
You may configure the admin consent endpoint to fit your needs, including handling errors and successful grants. For more information, see [Admin consent URI](/entra/identity-platform/v2-admin-consent).
4037

41-
4238
## Container type Permissions
4339

4440
The registration API determines what permissions a SharePoint Embedded application can perform against containers and content in containers for the specified container type.
4541

4642
| Permission | Description |
4743
| -------------------- | ------------------------------------------------------------------------------------------------------------------ |
4844
| None | Has no permissions to any containers or content of this container type. |
49-
| ReadContent | Can read content of containers of this container type. |
50-
| WriteContent | Can write content to containers for this container type. This permission can't be granted without the ReadContent permission. |
45+
| ReadContent | Can read the content of containers of this container type. |
46+
| WriteContent | Can write content to containers for this container type. This can't be granted without the ReadContent permission. |
5147
| Create | Can create containers of this container type. |
5248
| Delete | Can delete containers of this container type. |
5349
| Read | Can read the metadata of containers of this container type. |
@@ -57,53 +53,28 @@ The registration API determines what permissions a SharePoint Embedded applicati
5753
| UpdatePermissions | Can update (change roles of) existing memberships in the container for containers of this container type. |
5854
| DeletePermissions | Can delete other members (but not self) from the container for containers of this container type. |
5955
| DeleteOwnPermissions | Can remove own membership from the container for containers of this container type. |
60-
| ManagePermissions | Can add, remove (including self) or update members in the container roles for containers of this container type. |
56+
| ManagePermissions | Can add, remove (including self), or update members in the container roles for containers of this container type. |
57+
| ManageContent | Can manage the content of the container |
6158
| Full | Has all permissions for containers of this container type. |
6259

63-
## HTTP request
64-
65-
```http
66-
PUT {RootSiteUrl}/_api/v2.1/storageContainerTypes/{containerTypeId}/applicationPermissions
67-
```
68-
69-
> [!NOTE]
70-
> This is NOT a Graph API
71-
>
72-
> `{RootSiteURL}` is the SharePoint URL of the consuming tenant. For example, https://contoso.sharepoint.com.
73-
74-
### Request body
75-
76-
In the request body, supply a JSON representation of the container type permissions for the SharePoint Embedded applications.
77-
78-
### Response
79-
80-
If successful, this method returns a `200 OK` response code and the container type permissions configured for the SharePoint Embedded applications in the response body.
81-
82-
| HTTP Code | Description |
83-
| :--------: | ----------- |
84-
| 400 | Bad request. |
85-
| 401 | Request lacks valid authentication credentials. |
86-
| 403 | Provided authentication credentials are valid but insufficient to perform the requested operation. Examples: the calling app isn't the owning app of the container type. |
87-
| 404 | Container type doesn't exist. |
88-
8960
## Examples
9061

9162
### Register the container type in a consuming tenant with permissions only for the Owning App
9263

93-
Register the container type in the consuming tenant and grant full permissions to the Owning Application (AppId 71392b2f-1765-406e-86af-5907d9bdb2ab) for Delegated and AppOnly calls.
64+
Register the container type `de988700-d700-020e-0a00-0831f3042f00` in the consuming tenant and grant `full` permissions to the owning application `71392b2f-1765-406e-86af-5907d9bdb2ab` for delegated and app-only calls.
9465

9566
#### Request
9667

97-
```json
98-
PUT {RootSiteUrl}/_api/v2.1/storageContainerTypes/{containerTypeId}/applicationPermissions
68+
```http
69+
PUT https://graph.microsoft.com/beta/storage/fileStorage/containerTypeRegistrations/de988700-d700-020e-0a00-0831f3042f00
9970
Content-Type: application/json
10071
10172
{
102-
"value": [
73+
"applicationPermissionGrants": [
10374
{
10475
"appId": "71392b2f-1765-406e-86af-5907d9bdb2ab",
105-
"delegated": ["full"],
106-
"appOnly": ["full"]
76+
"delegatedPermissions": ["full"],
77+
"applicationPermissions": ["full"]
10778
}
10879
]
10980
}
@@ -112,36 +83,56 @@ Content-Type: application/json
11283
#### Response
11384

11485
```json
115-
HTTP/1.1 200 OK
116-
Content-type: application/json
86+
HTTP/1.1 201 Created
87+
Content-Type: application/json
11788

11889
{
119-
"value": [
90+
"@odata.type": "#microsoft.graph.fileStorageContainerTypeRegistration",
91+
"id": "de988700-d700-020e-0a00-0831f3042f00",
92+
"name": "Test Container Type",
93+
"owningAppId": "71392b2f-1765-406e-86af-5907d9bdb2ab",
94+
"billingClassification": "trial",
95+
"billingStatus": "valid",
96+
"registeredDateTime": "08/11/2025",
97+
"expirationDateTime": "08/11/2025",
98+
"etag": "RVRhZw==",
99+
"settings": {
100+
"@odata.type": "microsoft.graph.fileStorageContainerTypeRegistrationSettings",
101+
"sharingCapability": "disabled",
102+
"urlTemplate": "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}",
103+
"isDiscoverabilityEnabled": true,
104+
"isSearchEnabled": true,
105+
"isItemVersioningEnabled": true,
106+
"itemMajorVersionLimit": 50,
107+
"maxStoragePerContainerInBytes": 104857600,
108+
"isSharingRestricted": false
109+
},
110+
"applicationPermissionGrants": [
120111
{
121112
"appId": "71392b2f-1765-406e-86af-5907d9bdb2ab",
122-
"delegated": ["full"],
123-
"appOnly": ["full"]
113+
"delegatedPermissions": ["full"],
114+
"applicationPermissions": ["full"]
124115
}
125116
]
126117
}
127118
```
128119

129120
### Register the container type in a consuming tenant with permissions for a Guest App
130121

131-
Register the container type in the consuming tenant and grant full permissions to the Owning Application (AppId 71392b2f-1765-406e-86af-5907d9bdb2ab) for Delegated and AppOnly calls. In addition, grant a Guest App (AppId 89ea5c94-7736-4e25-95ad-3fa95f62b6) read and write permissions only for Delegated calls.
122+
Register the container type `de988700-d700-020e-0a00-0831f3042f00` in the consuming tenant and grant full permissions to the owning application `71392b2f-1765-406e-86af-5907d9bdb2ab` for delegated and app-only calls. In addition, grant a guest app `89ea5c94-7736-4e25-95ad-3fa95f62b6` both `read` and `write` permissions only for delegated calls.
132123

133124
#### Request
134125

135-
```json
136-
PUT /storagecontainerTypes/{containerTypeId}/applicationPermissions
126+
```http
127+
PUT https://graph.microsoft.com/beta/storage/fileStorage/containerTypeRegistrations/de988700-d700-020e-0a00-0831f3042f00
137128
Content-Type: application/json
138129
139130
{
140-
"value": [
131+
"applicationPermissionGrants": [
141132
{
142133
"appId": "71392b2f-1765-406e-86af-5907d9bdb2ab",
143-
"delegated": ["full"],
144-
"appOnly": ["full"]
134+
"delegatedPermissions": ["full"],
135+
"applicationPermissions": ["full"]
145136
},
146137
{
147138
"appId": "89ea5c94-7736-4e25-95ad-3fa95f62b6",
@@ -155,15 +146,35 @@ Content-Type: application/json
155146
#### Response
156147

157148
```json
158-
HTTP/1.1 200 OK
159-
Content-type: application/json
149+
HTTP/1.1 201 Created
150+
Content-Type: application/json
160151

161152
{
162-
"value": [
153+
"@odata.type": "#microsoft.graph.fileStorageContainerTypeRegistration",
154+
"id": "de988700-d700-020e-0a00-0831f3042f00",
155+
"name": "Test Container Type",
156+
"owningAppId": "71392b2f-1765-406e-86af-5907d9bdb2ab",
157+
"billingClassification": "trial",
158+
"billingStatus": "valid",
159+
"registeredDateTime": "08/11/2025",
160+
"expirationDateTime": "08/11/2025",
161+
"etag": "RVRhZw==",
162+
"settings": {
163+
"@odata.type": "microsoft.graph.fileStorageContainerTypeRegistrationSettings",
164+
"sharingCapability": "disabled",
165+
"urlTemplate": "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}",
166+
"isDiscoverabilityEnabled": true,
167+
"isSearchEnabled": true,
168+
"isItemVersioningEnabled": true,
169+
"itemMajorVersionLimit": 50,
170+
"maxStoragePerContainerInBytes": 104857600,
171+
"isSharingRestricted": false
172+
},
173+
"applicationPermissionGrants": [
163174
{
164175
"appId": "71392b2f-1765-406e-86af-5907d9bdb2ab",
165-
"delegated": ["full"],
166-
"appOnly": ["read"]
176+
"delegatedPermissions": ["full"],
177+
"applicationPermissions": ["full"]
167178
},
168179
{
169180
"appId": "89ea5c94-7736-4e25-95ad-3fa95f62b6",

0 commit comments

Comments
 (0)