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/use-msgraph.md
+19-17Lines changed: 19 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,37 @@
1
1
---
2
-
title: Use the MSGraphClient to connect to Microsoft Graph
3
-
description: Use the MSGraphClient class to make calls to the Microsoft Graph REST API.
4
-
ms.date: 6/21/2022
2
+
title: Use the MSGraphClientV3 to connect to Microsoft Graph
3
+
description: Use the MSGraphClientV3 class to make calls to the Microsoft Graph REST API.
4
+
ms.date: 9/29/2022
5
5
ms.localizationpriority: high
6
6
---
7
7
8
-
# Use the MSGraphClient to connect to Microsoft Graph
8
+
# Use the MSGraphClientV3 to connect to Microsoft Graph
9
9
10
-
When building SharePoint Framework solutions, you can easily connect to the Microsoft Graph by using the **MSGraphClient**.
10
+
When building SharePoint Framework solutions, you can easily connect to the Microsoft Graph by using the **MSGraphClientV3**.
11
11
12
12
## MSGraphClient overview
13
13
14
-
**MSGraphClient** is a new HTTP client introduced in SharePoint Framework v1.6.0 that simplifies connecting to the Microsoft Graph inside SharePoint Framework solutions. **MSGraphClient** wraps the existing [Microsoft Graph JavaScript Client Library](https://www.npmjs.com/package/@microsoft/microsoft-graph-client), offering developers the same capabilities as when using the client library in other client-side solutions.
14
+
**MSGraphClientV3** is a new HTTP client introduced in SharePoint Framework v1.15.0 that simplifies connecting to the Microsoft Graph inside SharePoint Framework solutions. **MSGraphClientV3** wraps the [Microsoft Graph JavaScript Client Library v3](https://www.npmjs.com/package/@microsoft/microsoft-graph-client), offering developers the same capabilities as when using the client library in other client-side solutions.
15
15
16
-
While you could use the Microsoft Graph JavaScript Client Library in your solution directly, **MSGraphClient** handles authenticating against the Microsoft Graph for you, which allows you to focus on building your solution.
16
+
**MSGraphClientV3** replaces **MSGraphClient** which was introduced in SharePoint Framework v1.6.0. **MSGraphClient** wrapped the Microsoft Graph JavaScript Client Library v1.
17
+
18
+
While you could use the Microsoft Graph JavaScript Client Library in your solution directly, **MSGraphClientV3** handles authenticating against the Microsoft Graph for you, which allows you to focus on building your solution.
17
19
18
20
## Use the MSGraphClient in your solution
19
21
20
22
> [!NOTE]
21
-
> The **MSGraphClient** is available only in projects built using SharePoint Framework v1.6.0 and later. While the **MSGraphClient** is explained in this article by using a client-side web part, you can also use it in SharePoint Framework Extensions.
23
+
> The **MSGraphClientV3** is available only in projects built using SharePoint Framework v1.15.0 and later. While the **MSGraphClientV3** is explained in this article by using a client-side web part, you can also use it in SharePoint Framework Extensions.
22
24
23
25
> [!NOTE]
24
-
> The single sign-on for the **MSGraphClient** is only available in SharePoint Online today. You can leverage the client for on premises developments but your users will be requested to sign in again within the webpart.
26
+
> The single sign-on for the **MSGraphClientV3** is only available in SharePoint Online today. You can leverage the client for on premises developments but your users will be requested to sign in again within the webpart.
25
27
26
-
1. To use the **MSGraphClient** in your SharePoint Framework solution, add the following `import` clause in your main web part file:
28
+
1. To use the **MSGraphClientV3** in your SharePoint Framework solution, add the following `import` clause in your main web part file:
0 commit comments