Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'm blocked and I need your help. I would like to do on PowerBI a POST API request on a TFS server which works fine on Postman but I always the same issue on PBI:
DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously.
Details:
DataSourceKind=Web
DataSourcePath=http://{instance}/DefaultCollection/{project}/_apis/wit/
The request is:
let
url = "http://{instance}/DefaultCollection/{project}/_apis/wit/wiql?api-version=3.0",
content = "
{""query"": ""
SELECT *
FROM WorkItemLinks
WHERE
([System.Links.LinkType] = 'System.LinkTypes.Dependency-Forward')
AND Source.[System.WorkItemType] = 'Requirement'
AND Source.[System.State] <> 'Closed'
AND ( Target.[System.WorkItemType] = 'Task'
OR Target.[System.WorkItemType] = 'Bug')
AND Target.[System.State] <> 'Closed'
ORDER BY [System.Id]
ASOF '1/1/15'
mode(maycontain)""
}",
Source = Json.Document(Web.Contents(url,[Headers = [#"Content-Type"="application/json"], Content = Text.ToBinary(content) ] ))
in
SourceAs said below, on Postman, it works fine using NTLM Authentication method. So I do not known if the issue coming from the authentication method used on powerbi (basic GET API rest method works) or if the method is not correctly written ...
Hi @Anonymous ,
For the error message, I think you didn't choose Anonymous authentication for the web data source.
Please open Data Source Settings, then find the web data source, choose Anonymous like below:
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @v-xuding-msft
I already tried this solution, but it doesn't work:
I also tried a POST request which doesn't need authentication, and every thing is ok, I suppose that I need to include authentication parameters into my request.
After several investigations I found the issue but I didn't find the solution yet ...
Using basic authentication, when I run the query I have following issue :
"Expression.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, Referer"
So, I changed the connection setting but, when I try to connect with Anonymous access to TFS I have following issue:
I tried with the TFS2017 OnPrem version of my compagny, with my personal ADOS, still the same issue, I couldn't connect to TFS anonymously ... Any idea ?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |