Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Custom Connectors - troubleshoot Oauth 2.0 - Generic Oauth 2

(0) ShareShare
ReportReport
Posted on by 20

I'm trying to create a custom connector based on oauth2 to a Saas solution (https://canvas.instructure.com/doc/api/file.oauth.html)

 

I'm able to create a connection to allow the connector to connect on my behalf and I have access to the API action I want to perform.

 

But when testing the custom connector, I receive a 401. In the test request I see a bearer token send to https://europe-001.azure-apim.net/apim/canvas.20flow.5fc4....

 

{
  "Authorization": "Bearer eyJ..."
}

 

The error message is:

{
  "errors": [
    {
      "message": "Invalid access token."
    }
  ]
}

 

Can I troubleshoot this further without having access to the Flow or SaaS backend?

  • Verified answer
    BartVermeersch Profile Picture
    BartVermeersch 20 on at
    Re: Custom Connectors - troubleshoot Oauth 2.0 - Generic Oauth 2

    Hi Mabel, thanks!

     

    We found the solution. The base url was still referring to a test environment while all other url's were updated to production url's..

     

    Bart

  • v-yamao-msft Profile Picture
    v-yamao-msft on at
    Re: Custom Connectors - troubleshoot Oauth 2.0 - Generic Oauth 2

    Hi @BartVermeersch,

     

    Have you created the connection successfully?

    The error message means that the access token you are using is invalid. Please try to verify access token and try again.

    Please check the following doc for more details:

    https://docs.apigee.com/api-platform/reference/policies/oauth-http-status-code-reference#verifyaccesstoken-invalidaccesstoken

    https://www.oauth.com/oauth2-servers/access-tokens/access-token-response/

     

    Best regards,

    Mabel

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics