|
1 |
| -# Overview of the GraphHttpClient |
| 1 | +# Overview of the GraphHttpClient class |
2 | 2 |
|
3 |
| -Using the Microsoft Graph you can build powerful solutions that use data from the different services that are a part of Office 365. In the past, connecting SharePoint Framework solutions to the Microsoft Graph was challenging, as it required you to register an Azure Active Directory application and complete the authorization flow. With the SharePoint Framework GraphHttpClient you can directly call the Microsoft Graph, without any additional setup. |
| 3 | +You can use Microsoft Graph to build powerful solutions that access data from Office 365 services. Connecting SharePoint Framework (SPFx) solutions to Microsoft Graph requires you to register an Azure Active Directory (Azure AD) application and complete the authorization flow. To make this easier, you can use the SPFx **GraphHttpClient** class to call Microsoft Graph directly, without any additional setup. |
4 | 4 |
|
5 |
| -> **Important:** The GraphHttpClient is currently in developer preview and should not be used in production. |
| 5 | +> **Important:** The **GraphHttpClient** class is currently in developer preview and is subject to change. We don't recommend that you use it in your production environment. |
6 | 6 |
|
7 |
| -## What is GraphHttpClient |
| 7 | +## What is GraphHttpClient? |
8 | 8 |
|
9 | 9 | GraphHttpClient is a specialized HTTP client provided as a part of the SharePoint Framework. It works similarly to the HttpClient that you can use to communicate with third party APIs. On top of the HttpClient, the GraphHttpClient automatically ensures that your request to the Microsoft Graph has a valid bearer access token and required headers. Whenever you issue a GET or a POST request, the GraphHttpClient verifies that it has a valid access token, and if it doesn't, it automatically retrieves one from an internal API and stores it for subsequent requests.
|
10 | 10 |
|
@@ -40,16 +40,16 @@ Using the GraphHttpClient is a very convenient way of communicating with the Mic
|
40 | 40 |
|
41 | 41 | ### Use for Microsoft Graph access only
|
42 | 42 |
|
43 |
| -The GraphHttpClient is meant to be used only for accessing the Microsoft Graph. The URL specified in the request must begin with the version of the Microsoft Graph API (either **v1.0** or **beta**) followed by the API operation. Any other URL will be rejected with an error. |
| 43 | +The GraphHttpClient is meant to be used only to access Microsoft Graph. The URL specified in the request must begin with the version of the Microsoft Graph API (either **v1.0** or **beta**), followed by the API operation. Any other URL will return an error. |
44 | 44 |
|
45 |
| -### Available permission scopes |
| 45 | +### Permissions |
46 | 46 |
|
47 |
| -The GraphHttpClient uses the **Office 365 SharePoint Online** Azure Active Directory application to retrieve a valid access token to the Microsoft Graph on behalf of the current user. The retrieved access token contains two permissions scopes: |
| 47 | +The GraphHttpClient uses the **Office 365 SharePoint Online** Azure AD application to retrieve a valid access token to Microsoft Graph on behalf of the current user. The retrieved access token contains two permissionss: |
48 | 48 |
|
49 | 49 | * **Read and write all groups (preview)** (`Group.ReadWrite.All`)
|
50 | 50 | * **Read all usage reports** (`Reports.Read.All`)
|
51 | 51 |
|
52 |
| -At this moment these are the only two permissions available when using the GraphHttpClient. If you need other permission scopes in your solution, you have to use [ADAL JS with implicit OAuth flow](web-parts/guidance/call-microsoft-graph-from-your-web-part.md) instead. |
| 52 | +At this moment these are the only two permissions available when using the GraphHttpClient. If you need other permission scopes in your solution, you can use [ADAL JS with implicit OAuth flow](web-parts/guidance/call-microsoft-graph-from-your-web-part.md) instead. |
53 | 53 |
|
54 | 54 | ### Tokens are retrieved using an internal API
|
55 | 55 |
|
|
0 commit comments