Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I'm pulling data from an API in an application called Freshservice (maybe there's someone out there using a similar source). In Desktop, it works perfectly, but I cannot get Service to authenticate.
This is my query source in Desktop:
Source = Csv.Document(Web.Contents("[API URL]", [Headers=[#"Content-Type"="application/csv", Authorization="Basic <[API key converted to Base64]>"]]),[Delimiter=",", QuoteStyle=QuoteStyle.Csv])
Authentication is built in and it works fine. A refresh in Service however always generates the same error:
"The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer"
It will not accept Anonymous, nor will it accept any combination of API key, encoded API key, username/password for the application.
I've been down many a rabbit hole on this one. Most people seem to have issues with the API url or pulling a limited number of records. None seem to differentiate between Desktop/Service. It's frustrating that one works and the other doesn't, but should Desktop be following a different method that allows Service to also connect?
Solved! Go to Solution.
Apologies if this was in the wrong place. Since fixed though, so I haven't logged it as an issue. In summary:
Through Power BI Desktop you can either set an authorisation header or specify Web API credentials to connect and pull data from Freshservice's API. Neither of these methods can be mirrored in Power BI Service; Web API cannot be set and it doesn't like the authorisation header being used.
Instead, you can connect to the API URL and authorise using 'Basic'. Enter your normal credentials for Freshservice, not your API key. And by 'normal' I mean not your SSO credentials if you typically login with an organisational domain account.
Power BI Service will pick up the API URL as a source and your normal credentials can be entered here too. So far, so good, automatic refreshing is working fine.
Apologies if this was in the wrong place. Since fixed though, so I haven't logged it as an issue. In summary:
Through Power BI Desktop you can either set an authorisation header or specify Web API credentials to connect and pull data from Freshservice's API. Neither of these methods can be mirrored in Power BI Service; Web API cannot be set and it doesn't like the authorisation header being used.
Instead, you can connect to the API URL and authorise using 'Basic'. Enter your normal credentials for Freshservice, not your API key. And by 'normal' I mean not your SSO credentials if you typically login with an organisational domain account.
Power BI Service will pick up the API URL as a source and your normal credentials can be entered here too. So far, so good, automatic refreshing is working fine.
Can you share the "Advanced Editor" code from powerquery that has worked for you. I am facing the same issue.
Hi @Anonymous ,
Anyway, is your problem be solved?
Yes, I'll accept my own response as the solution.
You could check the Issues forum here:
https://community.powerbi.com/t5/Issues/idb-p/Issues
And if it is not there, then you could post it.
If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
59 | |
31 | |
27 | |
22 | |
22 |
User | Count |
---|---|
63 | |
49 | |
31 | |
24 | |
21 |