Power Automate Custom Connector help

Maureen.B.923
Maureen.B.923 Berichten: 130 🧭
30 augustus aangepast in Social Groups

Has anyone created a custom connector in Power Automate for Brightspace APIs? Good ol' AI has been helping me limp slowly towards a solution, but now I'm stuck. I'm trying to build one that gets Brightspace datasets. All my API calls are working in Postman.

  1. I managed to create a custom connector that authenticates.
  2. I added a definition to download the Awards Issued dataset. It works! Yay! I was able to use it in a Power Automate flow.
  3. I added a second definition, this time to download the Users dataset. It does not work. It never works, despite me editing the code over and over. (Remember, it works in Postman.)

Here's the error when I test the Users definition:

I've attached a sample of my simplified swagger code.

Things I've tried:

  • Reversing the order of the definitions (Awards Issued continues to work, Users does not)
  • Getting AI to modify the code according to best practices
  • Deleting all definitions and starting from scratch

Reacties

  • Pratap Reddy.N.521
    Pratap Reddy.N.521 Berichten: 2 🌱

    Did you try updating the scopes with the proper one? Will swagger directly downloads the dataset after running get the request? I have used python script's for downloading the Datasets.

  • Arnie.M.2869
    Arnie.M.2869 Berichten: 1 🌱

    We do the same - pull down the datasets and load them into a SQL database.

  • Joseph.W.983
    Joseph.W.983 Berichten: 11
    3 september aangepast

    I think the scopes that Pratap is referring to are these:
    datahub:dataexports:download

    They're listed in the API documentation here.

  • Maureen.B.923
    Maureen.B.923 Berichten: 130 🧭

    Thanks all - I'm still stuck.

    1. I changed the scopes.
      1. AwardsIssued still works and downloads
      2. DownloadUsers still gives me a 403 error.
    2. When I test the DownloadUsers call via the Test Connection feature, I get this feedback:
      (I realized that testing via the Swagger UI view gave me 403 errors for both DownloadAwardsIssued and DownloadUsers. If I test via this interface, I only get an error for DownloadUsers.)

      I have checked and rechecked the formatting in my code and I/Co-pilot/ChatGPT can't find any errors with it.

  • Maureen.B.923
    Maureen.B.923 Berichten: 130 🧭

    I'm still struggling. One thing I noticed is that in Postman, DownloadAwardsIssued ALWAYS returns the .zip to me via redirect URL, but DownloadUsers is a straight download.

    In the Custom Connector, I had to use special code (see the code in 1 Minute Fixes - Handling 302 Redirect urls (powerplatform.com)) to get DownloadAwardsIssued to work.

    Outside of a Custom Connector, does anyone have ideas on how to make APIs work with M365 products to automatically retrieve data on a daily basis?

  • Maureen.B.923
    Maureen.B.923 Berichten: 130 🧭

    FYI I finally resolved custom connector woes. I could cry with happiness.

    I manually updated my scopes in the Brightspace tool, AND in the swagger code of the custom connector, but nothing worked. It turns out you need to hit the refresh connection icon in order for the Brightspace side of things to be picked up.