Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All,
We are trying to call one of our api to generate access token for one of our automation work.
Using below configuration.
When I connect, its failing with Datasource error. (in power bi)
But the same service is retuning response access token from postman or even with desktop app.
Any suggestions on this will be much appreciated.
Hi @Anonymous ,
any chance you can whitelist the domain name instead?
Not sure that powerbi.com runs under one dedicated IP address.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @Anonymous ,
if its the same query than in PBI, then I'm afraid I am running out of ideas here.
Looks like a bug.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF , Thanks for your thoughts,
Is there any method for retrieving the IP address of the Power BI cloud service? I attempted a GET request to another service using the query, and it provided a response. I have a suspicion that the service "https://api.apm****.com" may be limiting calls from Power BI, so we might need to add the Power BI cloud's IP address to the whitelist.
Hi @Anonymous ,
have you copied the query over from PBI Desktop or could it be that you have a typo in row 8:
acessAuth instead of accessAuth?
Otherwise: Any more hints if you click on "Show Details" in the error-message?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF
I am using pwerbi cloud - i.e, https://app.powerbi.com/ ,
The query is working fine on the desktop app, but when I try to call the service from power bi cloud, Looks like its unable to make the call to the rest api for generating the token's.
Below is the query i am try to hit.
let
Url = "https://api.apm****.com",
credentials =
[
client_id = "E5eUI7PBFfVLuKrJHhyw**",
client_secret = "Iu3Ih9eQ**"
],
acessAuth =
Json.Document(Web.Contents(
Url,
[
RelativePath = "oauth/client_credential/accesstoken",
Query =
[
grant_type = "client_credentials"
],
Headers =
[
#"Content-Type"= "application/x-www-form-urlencoded"
],
Content = Text.ToBinary(Uri.BuildQueryString(credentials))
]
)
),
token = acessAuth[access_token]
in
token
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |