For some of the examples you will need to create a Graph Subsciption. Below are some examples of the subscriptions that need to be created for the examples provided in this Repo
Graph Explorer is a handy tool and should be used to test the various endpoints and operations.
Description | Link |
---|---|
Graph Explorer | https://developer.microsoft.com/en-us/graph/graph-explorer |
Graph Subscriptions | https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http |
You can create a subscription by send a POST request to the subscriptions endpoint and in the Request body passing the proper JSON. Below is an example of that the JSON shoujld look like.
{
"changeType": "created",
"notificationUrl": "<https://YOUR URL THAT WILL BE CALLED>",
"resource": "/users/PoCSMB@XXX.onmicrosoft.com//mailfolders('inbox')/messages",
"expirationDateTime":"2023-04-04T11:00:00Z",
"clientState": "secretClientValue",
"latestSupportedTlsVersion": "v1_2"
}
Below is a screenhot of what this would look like in Graph Explorer.
- Navigate to (https://developer.microsoft.com/en-us/graph/graph-explorer) and make sure you are logged-in to an account that has permissions to Graph.
- Send a GET request to the subscriptions endpoint https://graph.microsoft.com/v1.0/subscriptions. Below is an example. If you have any subscriptions they will be noted in the Response Preview Window.