cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Not able to pull OneNote page content through flow and Graph API

Hi All,

 

I am trying to pull onenote page content using pageid through GraphAPI in flow, but i am seeing the below error, i am trying to pull my own onenote page content, but still see the issue, please let me know what i am doing wrong in this.

{
  "error": {
    "code": "30108",
    "message": "OneDrive for Business for this user account cannot be retrieved.",
    "innerError": {
      "request-id": "5b6bd58d-8d95-4042-bec6-c7b351895978",
      "date": "2019-07-25T05:08:37"
    }
  }
}

below is my flow steps, where i am using variable for adding pageid to URL

Screen Shot 2019-07-25 at 9.55.16 AM.png

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Not able to pull OneNote page content through flow and Graph API

Hi @sannadisarath ,

Could you please share a bit more about your scenario?

Do you want to pull a OneNote Page content from a flow, then return it back to your app?

 

Based on the needs that you mentioned, I think it is not necessary to add a "HTTP" action to send HTTP request to retrieve the Notekook Page content, instead, the combination of the "Get page content" action of NoteBook connector and "Respond to PowerApps" action could achieve your needs.

 

The user @NewNW has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/Open-OneNote-page-in-PowerApps/m-p/281706

 

I have made a test on my side, please consider take a try with the following workaround:

The Flow's configuration as below:16.JPG

Within the Notebook key field, Notebook section filed and Page Id field of the "Get page content" action, please type "Ask in PowerApps" dynamic content separately.

 

The App's configuration as below:17.JPG

 

18.JPG

 

19.JPG

Set the Items property of the Dropdown1 to following:

'OneNote(Business)'.GetNotebooks()

Set the Items property of the Dropdown2 to following:

'OneNote(Business)'.GetSectionsInNotebook(Dropdown1.Selected.Key).value

Set the Items property of the Dropdown3 to following:

'OneNote(Business)'.GetPagesInSection(Dropdown1.Selected.Key, Dropdown2.Selected.pagesUrl).value

 

Set the OnSelect property of the "Retrieve Page Content" button to following:

Set(
PageContent,
RetrieveOneNotePageContent.Run(Dropdown1.Selected.Key, Dropdown2.Selected.pagesUrl, Dropdown3.Selected.contentUrl).page_content
)

On your side, you may type following:

Set(
PageContent,
'Your Flow Name'.Run(Dropdown1.Selected.Key, Dropdown2.Selected.pagesUrl, Dropdown3.Selected.contentUrl).page_content
)

 

Add a Html text control, set the Html Text property to following:

PageContent

Please consider take a try with above solution, then check if the issue is solved.

 

More details about firing a flow from a PowerApps app, please check the following article or video:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Not able to pull OneNote page content through flow and Graph API

Hi Kris,

 

Appriciate your response, but i am looking to get only page content without going through sections and notebooks,

I am able to pull all pages and search a particular page and pull information from that page, is that possible in flow?

Highlighted
Community Support
Community Support

Re: Not able to pull OneNote page content through flow and Graph API

Hi @sannadisarath ,

Based on the needs that you mentioned, I think the Alternative Solution I provided above could achieve your needs.

 

If you just want to get only page content without going through sections and notebooks, I think Microsoft Flow could achieve your needs.

Instead of using "HTTP" action in your MS Flow, you could consider create a custom connector based on the Microsoft Graph API in your Microsoft Flow. Then within your flow, create a connection to the custom connector, and use the custom connector action to retrieve page content from a specific page.

 

More details about creating a custom connector in Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/flow/developer/register-custom-api

Please also check and see if the following video could help in your scenario:

https://www.youtube.com/watch?v=dBCS1nPsDiE

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,012)