Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello. I have a macro that extract some content form an intranet, but I´m having trouble to implement the same solution using M.
The part of the vba code that matters is:
---------------------
Parameter = "MyParameter"
Url = "MyURL"
With CreateObject("MSXML2.XMLHTTP.6.0")
.Open "POST", Url, False
.setRequestHeader "User-Agent", "mozilla/4.0 (compatible; MSIE 6.0)"
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1"
.send Parameter
txt = .responsetext
End With
Set objXmlHttp = Nothing
text = Split(txt, Chr(10))
-----------
and then I have the data I need in txt format....
Anyone can help me to get the same data using Power Query?
Hi, did you ever figure out how to POST data using Windows Credentials to an API? GET seems to be supported but not POST. Any help would be appreciated as it's driving me nuts! Regards, Steve
@natolira,
Please take a look at the following similar thread to connect to your API using M language.
https://community.powerbi.com/t5/Integrations-with-Files-and/How-to-Authenticate-to-a-REST-API-with-...
Regards,
Lydia
Lydia, thanks! I´m afraid tis link workd with basic authentication, not with windows authentication, which is my necessity.
@natolira,
You can directly add connection information in Advanced Editor to connect to your API. When using Windows credentials , please verify that you have been granted access with your own user/password combination. There are some samples for your reference.
https://jessedotnet.com/2016/06/24/power-bi-connect-to-your-secure-api/
http://angryanalyticsblog.azurewebsites.net/index.php/2016/05/16/api-strategies-with-power-bi/
Regards,
Hello. I have a macro that extract some content form an intranet, but I´m having trouble to implement the same solution using M.
The part of the vba code that matters is:
---------------------
Parameter = "MyParameter"
Url = "MyURL"
With CreateObject("MSXML2.XMLHTTP.6.0")
.Open "POST", Url, False
.setRequestHeader "User-Agent", "mozilla/4.0 (compatible; MSIE 6.0)"
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1"
.send Parameter
txt = .responsetext
End With
Set objXmlHttp = Nothing
text = Split(txt, Chr(10))
-----------
and then I have the data I need in txt format....
Anyone can help me to get the same data using Power Query?
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |