web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / OneNote (business) con...
Power Automate
Unanswered

OneNote (business) connector - Unable to parse site ids from OneNote API

(0) ShareShare
ReportReport
Posted on by 31

I am using Flow in a Office 365 Government G3 tentant and having problems using the OneNote (business) connector to Get sections in notebook, which returns with BadGateway, Status Code 502, and Body below:

{
 "error": {
 "code": 502,
 "message": "Unable to parse site ids from OneNote API. Code: 500, Response:",
 "source": "flow-apim-msmanaged-na-westus2-01.azure-apim.net",
 "path": "choose[4]\\when[1]\\choose[2]\\when[1]",
 "clientRequestId": "3ce57d0e-e10e-413a-9d1d-c6be0e784f0b"
 }
}

I tried to debug using a new flow, with just Get pages for specific section. The dropbox for Notebook Key populates with all my Notebooks, however when I select any Notebook, the dropbox for Notebook section shows "Could not retrieve values. Unable to parse site ids from OneNote API. Code: 500, Response:"

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    on at

    Hi @bnixon,

     

    I have tested it on my side and it works well.Annotation 2019-08-09 105750.png

     

    You can check the connection you used whether correct, you can recreate your connection of OneNote connector, and try it again.

    Annotation 2019-08-09 110019.png

    Please have a try, I hope it can help you.

     

    Best Regards,

    Community Support Team _ Lin Tu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • BN-28082257-0 Profile Picture
    31 on at

    I am still having the issue described. I created a new flow, which I assume recreates the OneNote connection, or is there another way?

     

    Here's the peek code for the Get Sections in a Notebook, which is one of the actions that fails (I redacted host and user with XXXXX and YYYYY):

    {
     "inputs": {
     "host": {
     "connection": {
     "name": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_onenote_1']['connectionId']"
     }
     },
     "method": "get",
     "path": "/notebooks/notebookKey/sections",
     "queries": {
     "notebookKey": "Test|$|https://XXXXX-my.sharepoint.com/personal/YYYYY/Documents/Notebooks/People/Test"
     },
     "authentication": {
     "type": "Raw",
     "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
     }
     },
     "metadata": {
     "flowSystemMetadata": {
     "swaggerOperationId": "GetSectionsInNotebook"
     }
     }
    }
  • v-litu-msft Profile Picture
    on at

    Hi @bnixon,

     

    I noticed that the notebookKey is your code that is not similar to mine.

    My code is /Notebooks/Notebook Name, but your code is /Notebooks/Notebook Name/Section Name.

    Your action is Get the section in notebooks, right? You can check the notebookKey whether correct.

    {
     "inputs": {
     "host": {
     "connection": {
     "name": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_onenote_1']['connectionId']"
     }
     },
     "method": "get",
     "path": "/notebooks/notebookKey/sections",
     "queries": {
      "notebookKey": "Test|$|https://XXXXX-my.sharepoint.com/personal/YYYYY/Documents/Notebooks/People/Test"
     },
     "authentication": {
     "type": "Raw",
     "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
     }
     },
     "metadata": {
     "flowSystemMetadata": {
     "swaggerOperationId": "GetSectionsInNotebook"
     }
     }
    } 

     

    Best Regards,

    Community Support Team _ Lin Tu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • BN-28082257-0 Profile Picture
    31 on at

    The notebookKey is being populated based on the Notebook name I select  in "Get sections in Notebook"

     

    The Notebook is physically in my OneDrive at that location:

    https://XXXXX-my.sharepoint.com/personal/YYYYY/Documents/Notebooks/People/Test

    i.e. the Notebook name is "Test" and it is a "People" folder within the "Notebooks" folder. I am able to open the Test Notebook using that exact URL, so I believe the path and key is correct.

     

    I decided to try using the Microsoft Graph API to see if I can get to the Notebook and sections, and that is failing as well, i.e. when I try "https://graph.microsoft.com/v1.0/me/onenote/notebooks" in Graph Explorer, I get:

    {
     "error": {
     "code": "UnknownError",
     "message": "",
     "innerError": {
     "request-id": "3088b795-4e07-434a-8565-00d7b69eb74a",
     "date": "2019-08-16T21:33:14"
     }
     }
    }

    So, I wonder if the OneNote (business) connector is fully supported in O365 G3 or if there are additional permissions or configuration required.

     

    At a prior company, using O365 Business (not Government), all of this worked.

  • v-litu-msft Profile Picture
    on at

    Hi @bnixon,

     

    It's not a permission issue, cause it has no error message that "Please check your account info and/or permissions and try again".

     

    Could you please share your action configuration?

     

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

  • BN-28082257-0 Profile Picture
    31 on at

    How do I see (or share) my action configuration?

     

    I am not doing anything special in setting up the flow.

     

    For example, I create a new blank flow, add a "Get pages for a specific section" Step, select my Notebook Key, and then then cannot select a Notebook section.

     

    Flow Issue.PNG

  • Community Power Platform Member Profile Picture
    on at

    I am having the same issue while using the Meeting Capture app template in Power Apps.  I too am using a goverment license GCC.

     

    Any help would be greatly appreciated.

  • v-litu-msft Profile Picture
    on at

    Hi @bnixon,

     

    Sorry for late, there are some issue happened on the OneNote connector currently. And some features have been solved.

    Do you still have the issue?

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

  • Community Power Platform Member Profile Picture
    on at

    Yes, this issue is still occurring.  The Error message that I receive is:

     

    OneNote(Business).GetSectionslnNotebook failed: {"error": {"code": 502, "message": "Unable to parse site ids from OneNote API. Code: 500, Response:", "source": "power-apis-usgov001-public.azure-apihub.us", "path": "choose[4]\\when[1]\\choose[2]\\when ^ [1]", "clientRequestld": "60c8cb53-9b60-4839-8a19-b19e0c22fb60"}}

     

     

  • BN-28082257-0 Profile Picture
    31 on at

    Yes, I can confirm this issue is still occuring in Flow with the OneNote (business) connector.

     

    Also (perhaps related), the Graph APIs related to OneNote also do not work in the Graph Explorer, but other APIs (such as GET my email, profile, photo, etc..) do work.

     

    Seems like OneNote for business isn't properly configured to work with Flow, PowerApps, Graph, etc.. for G3 O365.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard