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/call-microsoft-graph-using-graphhttpclient.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
# Use GraphHttpClient to call Microsoft Graph
2
-
>**Important:** The **GraphHttpClient** is currently in preview and is subject to change. It is not currently supported for use in production environments.
2
+
> [!IMPORTANT]
3
+
>The **GraphHttpClient** is currently in preview and is subject to change. It is not currently supported for use in production environments.
3
4
4
5
Use the **GraphHttpClient** class to make calls to the Microsoft Graph REST API. You can make GET, POST, and PATCH requests using the **get()**, **post()**, and **fetch()** methods. This article shows how to build a web part that uses **GraphHttpClient**, but you can use **GraphHttpClient** in any SharePoint Framework client code.
5
6
@@ -273,20 +274,21 @@ Again, you need to modify the HTML to add a button that will create a new group.
273
274
* Because your solution is already registered, you'll be prompted as to whether you want to replace it. Choose **Replace it**.
274
275
* When prompted as to whether you trust the solution, choose **Deploy**.
275
276
276
-
3, Use gulp serve to host the web part.
277
+
3. Use gulp serve to host the web part.
277
278
278
279
```
279
280
gulp serve --nobrowser
280
281
```
281
282
282
-
4, Add the web part to a web page, or use the SharePoint workbench.
283
+
4. Add the web part to a web page, or use the SharePoint workbench.
283
284
284
285
You should see the following on your page.
285
286

286
287
287
-
5, When you choose **Create New Group**, the code will create a new Office 365 group.
288
+
5. When you choose **Create New Group**, the code will create a new Office 365 group.
288
289
289
-
>**Note:** If you try to create the same group again, the code will return an error because the group already exists. The error is logged to the console, which you can view in the browser's developer mode.
290
+
> [!NOTE]
291
+
>If you try to create the same group again, the code will return an error because the group already exists. The error is logged to the console, which you can view in the browser's developer mode.
290
292
291
293
## Update a group using a PATCH call
292
294
@@ -313,4 +315,4 @@ The following code shows how to call the **fetch()** method to update an existin
313
315
});
314
316
```
315
317
316
-
The ID of the group is specified in the URL. Get the ID by using a GET call first. The **method** parameter is set to **PATCH**. The body specifies which group properties to modify.
318
+
The ID of the group is specified in the URL. Get the ID by using a GET call first. The **method** parameter is set to **PATCH**. The body specifies which group properties to modify.
0 commit comments