'Pass OneNote Authentication token to custom action
I would like to delete a OneNote page in a Microsoft Flow. I appears there are no standard actions to do so, but I can call the DELETE api on the page that's passed in.
But, how do I obtain the bearer token from the OneNote connector?
Solution 1:[1]
Actually you do not need to extract authentication token from existing Connection as OneNote API is available via the Microsoft Graph API.
- Authenticate using Bearer obtained from
/oauth2/v2.0/tokenendpoint usinggrant_type=client_credentialsor any other flow - Get
Page IDof desired document - Use one of HTTP
DELETEmethods described here https://docs.microsoft.com/graph/api/page-delete?view=graph-rest-1.0&tabs=cs
![1]](https://i.stack.imgur.com/mctan.png)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | nervuzz |
