Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am struggling with the connection between AFAS online and PowerBI online.
On my desktop PowerBI report I have connected several AFAS connectors to the PowerBI Desktop via a Web-source --> Advanced --> URL (HTTPS://[afas key].rest.afas.online/profitrestservices/connectors/[name connector]+ Authorization parameter (filled in the unique base 64 AFAS token). After connecting and setting a parameter for the token, I got following link in the query editor:
=Json.Document(Web.Contents("HTTPS://[afas key].rest.afas.online/profitrestservices/connectors/[name connector]", [headers=[Authorization={Parameter for the base 64 token}]])).
Now, I have 5 different connectors connected to my PowerBI desktop, and they all load and work when I refresh the report manually. After creating a whole dashboard I published it to the workspace for sharing.
The problem is that in the PowerBI web environment the report is not able to refresh. When I want to refresh an error comes up: "The credentials provided for the Web source are invalid. (Source at [afas link above])". I find this weird because it is able to load into the desktop version, so why not in the online version? The goal is to create automated refreshes.
I think it has something to do with the authorization parameter but I have no clue...
Thanks a lot for the help!
Hi RikSN,
Did you manage to solve the problem and if yes, how? Struggling with the same issue.
Thanks in advance,
Justin
Hi @RikSN,
Have you config power bi url on your data source side? If not, you can take a look at the following document to add them to whitelist to prevent if these request has been blocked:
Add Power BI URLs to your allow list
Regards,
Xiaoxin Sheng
Hi @RikSN,
It sounds like a common issue when you work with a web connector and anonymous authorization. I'd like to suggest you add operation parameters 'RelativePath' on your connector and split your URL to root path and 'relative path'.
let
Source =
Json.Document(
Web.Contents(
"HTTPS://[afas key].rest.afas.online",
[
RelativePath = "/profitrestservices/connectors/[name connector]",
Headers = [
Authorization = "[Token]"
]
]
)
)
in
Source
Reference link:
Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code
'Dataset refresh : successfull via PBI-Desktop, but erroneous after publish to PBI-Service
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |