Forum Discussion
Isssue Adding Web.Content Column to Web Data
First and most importantly: it looks like you're trying to connect to an API that requires OAuth2 authentication, and in order to do that you're going to need to create a custom connector as discussed here https://blog.crossjoin.co.uk/2021/08/29/connecting-to-rest-apis-with-oauth2-authentication-in-power-query-power-bi/ Even if you get past this particular issue, you might well run into other issues later on you can't work around. I suspect that building a custom connector might also help with this issue too.
For this specific error, this section on partitions in a presentation on data privacy that I gave a few years ago will explain the cause: https://youtu.be/RbqCA6srkmM?t=2002 (you'll probably want to watch the whole presentation for context though). Your response step is indeed accessing a data source and accessing data from other partitions so generating the string used for RelativePath and the record used for Headers in separate steps might help. You can also try setting the Skip Test Connection option on the data source in the Service (see https://blog.crossjoin.co.uk/2019/04/25/skip-test-connection-power-bi-refresh-failures/) as well.
Chris
Thank you for your video. Very interesting and well done. That being said, here are some comments and my results trying all the things in your video:
I am not sure why you say I need a custom connector. I have a single query that returns the API key and simply use that as my bearer token in the next query that calls for the status data. That being said, as I said in a previous comment, even if I hard code the Bearer token (to one that is fresh and active), I still get this same PowerBI error.
I also tried all these things (many mentioned in your video), and none succeeded. 😥
- Break things into multiple steps
- Set Privacy Levels all same
- Ignore Privacy Levels
- Set Skip Test Connections on all data sources
- Try using functions
- Try using one big query
- Try splitting into smaller queries
- lbendlin9 months agoSuper User
I am not sure why you say I need a custom connector.You need that if you want to refresh that semantic model in the Power BI service.
- cpwebb9 months agoMicrosoft Employee
Just to add to that (and to reiterate some of the points made in my blog post linked to above): if I'm correct that you're trying to connect to an API that requires OAuth2 authentication, the reason you need to build a custom connector is that Power Query/M as it exists today in Power BI and Excel do not have the functionality required to support doing this in a reliable and secure way. The functionality only exists in custom connectors.