You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spfx/release-1.15.2.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: SharePoint Framework v1.15.2 release notes
3
3
description: Release notes for the SharePoint Framework v1.15.2 release
4
-
ms.date: 08/09/2022
4
+
ms.date: 06/27/2022
5
5
ms.localizationpriority: high
6
6
---
7
7
# SharePoint Framework v1.15.2 release notes
@@ -48,7 +48,9 @@ Previously it was assumed and required that API to be already present in the ten
48
48
49
49
Now developers are able to specify **optional** attributes `appId` and `replyUrl` in `webApiPermissionRequests` section of `package-solution.json`.
50
50
51
-
When these attributes are present, administartors are presented standard Azure AD app registration consent as part of the API approval process.
51
+
When these attributes are present, administrators are presented standard Azure AD app registration consent as part of the API approval process.
52
+
53
+
For more information on this feature, see: [Requesting permissions to Azure AD applications in another tenant](use-aadhttpclient.md#requesting-permissions-to-azure-ad-applications-in-another-tenant).
52
54
53
55
### New Action types for media - General Availability
54
56
@@ -103,7 +105,7 @@ The action will be rendered as below:
Copy file name to clipboardExpand all lines: docs/spfx/use-aadhttpclient.md
+57-12Lines changed: 57 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Connect to Azure AD-secured APIs in SharePoint Framework solutions
3
3
description: Use the AadHttpClient class to connect to Azure AD-secured APIs in SharePoint Framework solutions.
4
-
ms.date: 01/31/2023
4
+
ms.date: 06/27/2023
5
5
ms.localizationpriority: high
6
6
---
7
7
@@ -11,7 +11,7 @@ When building SharePoint Framework solutions, you might need to connect to an AP
11
11
12
12
## Web API permissions overview
13
13
14
-
Azure AD secures a number of resources, from Office 365 to custom line-of-business applications built by the organization. To connect to these resources, applications must obtain a valid access token that grants them access to a particular resource. Applications can obtain an access token as part of the [OAuth authorization flow](/azure/active-directory/develop/active-directory-protocols-oauth-code).
14
+
Azure AD secures a number of resources, from Microsoft 365 to custom line-of-business applications built by the organization. To connect to these resources, applications must obtain a valid access token that grants them access to a particular resource. Applications can obtain an access token as part of the [OAuth authorization flow](/azure/active-directory/develop/active-directory-protocols-oauth-code).
15
15
16
16
Client-side applications that are incapable of storing a secret, such as SharePoint Framework solutions, use a specific type of OAuth flow named [OAuth implicit flow](/azure/active-directory/develop/active-directory-dev-understanding-oauth2-implicit-grant).
17
17
@@ -30,7 +30,7 @@ All permissions are granted to the whole tenant and not to a specific applicatio
30
30
31
31
## Discover available applications and permissions
32
32
33
-
The target Azure AD that secures your Office 365 tenant determines which applications you can request permissions for in your solution. The list of available applications might depend on the Office 365 license that the organization is using and which line-of-business applications they registered in Azure AD. If you have sufficient permissions, there are several ways that you can see which applications and permission scopes are available in your tenant.
33
+
The target Azure AD that secures your Microsoft 365 tenant determines which applications you can request permissions for in your solution. The list of available applications might depend on the Microsoft 365 license that the organization is using and which line-of-business applications they registered in Azure AD. If you have sufficient permissions, there are several ways that you can see which applications and permission scopes are available in your tenant.
34
34
35
35
### Use Azure portal or Azure AD admin center
36
36
@@ -170,6 +170,52 @@ If your SharePoint Framework solution requires permissions to specific resources
170
170
> [!NOTE]
171
171
> No matter if the administrator denies or approves the requested permissions, the solution can be deployed and used on sites. When building solutions that require additional permissions, you should never assume that the requested permissions have been granted.
172
172
173
+
### Requesting permissions to Azure AD applications in another tenant
174
+
175
+
The previous steps address adding a permission request to an Azure AD application defined in the same Azure AD tenant as your SharePoint Online tenant. However, when you want to grant a permission for an Azure AD application defined in another tenant (a multitenant Azure AD application), you must first add a service principal for that Azure AD application to your tenant.
176
+
177
+
> [!NOTE]
178
+
> This capability was added in the [SPFx v1.15.2 release](release-1.15.2.md).
179
+
180
+
> [!IMPORTANT]
181
+
> Azure AD applications have two types of principals. The application object is created when the Azure AD app is created; it is a *global* representation of the application across all tenants.
182
+
>
183
+
> Permissions are granted to service principals which are the *local* representation of the app for use in a specific tenant.
184
+
>
185
+
> When you create an Azure AD application in a tenant, both the application object & service principal are created in that tenant. But when you want to use the Azure AD application in another tenant, you must create a service principal for that application in your tenant.
186
+
>
187
+
> To learn more about Azure AD application principals, objects, and service principals, see: [Application and service principal objects in Azure Active Directory](/azure/active-directory/develop/app-objects-and-service-principals).
188
+
>
189
+
> To learn more about single and multitenant Azure AD applications, see: [Tenancy in Azure Active Directory](/azure/active-directory/develop/single-and-multi-tenant-apps).
190
+
191
+
When you want to grant SharePoint Online permissions to an Azure AD application defined to another tenant, the service principal needs to already exist on the tenant where SharePoint Online operates. Prior to SPFx v1.15.2, , SharePoint expected the service principal already existed. But SPFx v1.15.2 introduced a way to register the service principal during the permission request approval process.
192
+
193
+
To do this, you must include two additional properties in the SPFx project's **package-solution.json** file's `webApiPermissionRequests` entry:
"resource": "<API name as it's registered in Azure AD>",
203
+
"scope": "<required permission scope>",
204
+
"appId": "<GUID>",
205
+
"replyUrl": "<URL>"
206
+
}
207
+
]
208
+
..
209
+
```
210
+
211
+
The two additional properties are:
212
+
213
+
-`appId`: This is the application object's ID for which a service principal will get created in the tenant.
214
+
-`replyUrl`: This is the URL used by Azure AD during the consent and registration experience of the permission request.
215
+
216
+
> [!IMPORTANT]
217
+
> If either `appid` or `replyUrl` are included, they are both required. In other words, include both properties (*if you're referencing an Azure AD app registered in another tenant from your SharePoint Online tenant*) or neither property (*if you're referencing an Azure AD app registered in the same tenant as your SharePoint Online tenant*).
218
+
173
219
## Manage permission requests
174
220
175
221
When you deploy SharePoint Framework solutions that request permissions to Azure AD applications, administrators are prompted to manage the permission request provided with the solution. Permission requests can be managed in several ways.
@@ -232,11 +278,10 @@ Global and SharePoint administrators can use the [CLI for Microsoft 365](https:/
232
278
> Denying a permission request issued by a SharePoint Framework application doesn't prevent that application from being deployed in the app catalog and installed on sites.
233
279
234
280
- To *view which permissions have been granted* in your tenant, use the **[spo serviceprincipal grant list](https://pnp.github.io/cli-microsoft365/cmd/spo/serviceprincipal/serviceprincipal-grant-list/)** command. For each grant, the command displays the following information:
235
-
236
-
- **ObjectId**: The unique identifier for the permission grant.
237
-
- **Resource**: The resource to which access has been granted.
238
-
- **ResourceId**: The objectId of the resource service principal to which access has been granted.
239
-
- **Scope**: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
281
+
-**ObjectId**: The unique identifier for the permission grant.
282
+
-**Resource**: The resource to which access has been granted.
283
+
-**ResourceId**: The objectId of the resource service principal to which access has been granted.
284
+
-**Scope**: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
240
285
241
286
- To *revoke a previously granted permission*, use the **[spo serviceprincipal grant revoke](https://pnp.github.io/cli-microsoft365/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke/)** command. In the **grantId** parameter, specify the objectId of the grant that you want to revoke, which you can obtain by using the **spo serviceprincipal grant list** command.
242
287
@@ -247,7 +292,7 @@ Global and SharePoint administrators can use the [CLI for Microsoft 365](https:/
247
292
248
293
Introduced in v1.4.1, the SharePoint Framework simplifies connecting to APIs secured with Azure AD. Using the new **AadHttpClient**, you can easily connect to APIs secured with Azure AD without having to implement authentication and authorization yourself.
249
294
250
-
Internally, the **AadHttpClient** implements the Azure AD OAuth flow leveraging Microsoft identity platform authentication libraries by using the **SharePoint Online Client Extensibility** service principal to obtain a valid access token. The **SharePoint Online Client Extensibility** service principal is provisioned by Microsoft and is available in the Azure AD of all Office 365 tenants.
295
+
Internally, the **AadHttpClient** implements the Azure AD OAuth flow leveraging Microsoft identity platform authentication libraries by using the **SharePoint Online Client Extensibility** service principal to obtain a valid access token. The **SharePoint Online Client Extensibility** service principal is provisioned by Microsoft and is available in the Azure AD of all Microsoft 365 tenants.
251
296
252
297
1. To use the **AadHttpClient** in your SharePoint Framework solution, add the following `import` clause in your main web part file:
253
298
@@ -307,11 +352,11 @@ Following are some considerations that you should take into account when working
At this moment, it's only possible to request additional permissions through a SharePoint Framework solution. The request is started when the solution package (.sppkg) containing a permissions request is deployed in the app catalog. After the request is started, it can be approved or denied by a global or SharePoint administrator.
355
+
It's only possible to request additional permissions through a SharePoint Framework solution. The request is started when the solution package (**/*.sppkg**) containing a permissions request is deployed in the app catalog. After the request is started, it can be approved or denied by a global or SharePoint administrator.
311
356
312
-
### Granted permissions apply to all solutions
357
+
### Grantedpermissionsapplytotheentiretenant
313
358
314
-
Although permissions to Azure AD resources are being requested by a SharePoint Framework solution, once granted, they apply to the whole tenant and can be leveraged by any solution in that tenant.
0 commit comments