The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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".
User | Count |
---|---|
43 | |
15 | |
13 | |
13 | |
9 |
User | Count |
---|---|
50 | |
43 | |
24 | |
22 | |
18 |