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?