coopermj
coopermj

Reputation: 651

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?

Upvotes: 0

Views: 118

Answers (1)

nervuzz
nervuzz

Reputation: 476

Actually you do not need to extract authentication token from existing Connection as OneNote API is available via the Microsoft Graph API.

  1. Authenticate using Bearer obtained from /oauth2/v2.0/token endpoint using grant_type=client_credentials or any other flow
  2. Get Page ID of desired document
  3. Use one of HTTP DELETE methods described here https://learn.microsoft.com/graph/api/page-delete?view=graph-rest-1.0&tabs=cs

1]

Upvotes: 0

Related Questions