Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Custom Connector "No or not a valid Bearer token."

(0) ShareShare
ReportReport
Posted on by 211

I am trying to build a custom connector to an API that uses a Bearer Token for authentication.

https://app.swaggerhub.com/apis-docs/resolution-cloud/jira-outofoffice/1.0.2#/users/getRules

 

I tested everything out in Postman first and then exported the collection. I imported the custom connector, changed security to "API Key" and followed the steps here: https://powerusers.microsoft.com/t5/Using-Connectors/Bearer-Tokens-in-Custom-Connector/td-p/145171

 

When I tested a simple GET request I got the following 401 error:

HEADERS:

 

 

{
 "content-length": "31",
 "content-security-policy": "default-src 'self';script-src 'self' 'unsafe-inline' aui-cdn.atlassian.com connect-cdn.atl-paas.net ajax.googleapis.com;style-src 'self' 'unsafe-inline' aui-cdn.atlassian.com;font-src 'self' aui-cdn.atlassian.com",
 "content-type": "text/html; charset=utf-8",
 "date": "Tue, 07 Feb 2023 17:37:27 GMT",
 "etag": "W/\"1f-4oLZ9NOTJN9m/lCBAtm/AXldLdQ\"",
 "expect-ct": "max-age=0",
 "referrer-policy": "origin",
 "strict-transport-security": "max-age=315569520; includeSubDomains",
 "vary": "Accept-Encoding",
 "via": "1.1 vegur",
 "x-content-type-options": "nosniff",
 "x-dns-prefetch-control": "off",
 "x-download-options": "noopen",
 "x-ms-apihub-cached-response": "true",
 "x-ms-apihub-obo": "false",
 "x-permitted-cross-domain-policies": "none",
 "x-xss-protection": "0"
}

 

 

BODY:

 

 

No or not a valid Bearer token.

 

 

 

When looking at the request sent the Header looks like:

 

 

{
 "Authorization": "Bearer <Crazy long token created by a connection reference?>"
}

 

 

 

Any way to fix this authentication in Power Automate?

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,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics