Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I'm doing a weekly update to a rather large amount of datasets and have been encountering the following error:
Expression.Error: Access to the resource is forbidden
If I use an older version of Power BI, I do not have the same issue. This worked fine a week ago (and has for several months). No organizational changes as far as I'm aware, as I'm able to obtain those web documents from an older version of Power BI (2.63.3272). The version on which I'm getting the error is 2.65.5313.
Edit: Additional information... all the data resides in Excel files out on a sharepoint location. We use organizational sign-on to get access to the files. It is working and I can access it manually as well as through the older Power BI. I'm not getting the opportunity to sign into the organizational account for the files with this error. It just flatly denies me access.
Any assistance on this?
T.
Hi
I am having the same problem. I cannot to do "get data" from Power BI Desktop with the "web access" connector from last February 1st.
I try to link via "web connector" Excel files saved in Teams. I did it many times last months but now it doesn't work. I don't understand why I receice the message "access forbidden to the resource" if I created the file in teams (sharepoint) and I am using the same user in Power BI to "get data".
I am even not prompted to choose an account! I would like to choose my organizational account, but I cannot. Directlly Power Bi try to connect. It looks like it tries to connect with the default credentials "anonymous".
It is curious, because now in order to update an excel file already linked (before February 1st) I have to edit the connection, and choose my organizational account. At least for old files I can choose "organizational account" but for new files I have no chance to choose the organizational account as directly comes the mistake, The account panel is by-passed.
It happens with the last release of december. Mates with an old release don't have this issue!
So please, solve this incident!
Javier
Hello,
We are sorry that you are encountering this issue in the latest version. We are trying to find the cause of it. If you have a URL which can reproduce this issue, we would appreciate having it messaged to me privately so we can get more information on our side.
If you do not want to share the URL, we are curious about these properties of the API:
- Are you using HTTPS for the API?
- Are you using From Web, From SharePoint List, From OData, or another data source?
Thanks.
Hello,
I ran into an similar situation and having problem access data via API key.
Tried all possible ways to make it work but have failed to establish a connection. It was working all good untill last thursday.
Any help with this would be highly appreciated.
Regards
Now it works!
I have just received this reply from Cherry... I tested it and it works (after clearing the permissions). I copy here the reply:
---
If it still have problem , please create a new pbix file and clear the Permission the data source of SharePoint you used before under Edit Queries>> Data source setting>>Global Permissions>> find the sharepoint source >> Clear Permissions.
Please update the latest version of Power BI Desktop ( 2.66.5376.1681) and test again. By my test with this new version, everything works as expected.
If it still have problem , please create a new pbix file and clear the Permission the data source of SharePoint you used before under Edit Queries>> Data source setting>>Global Permissions>> find the sharepoint source >> Clear Permissions.
Then you could get data again.
-----
I excpect it also works for all of you!
Jaiver
Hi,
Just to confirm, I ran into this problems as well...
Corp environment.
Desktop development of report, with dataset loaded from Web connector to Excel doc stored on Sharepoint.
No problems for about a week. One day I decided to hit Refresh button, then got "Access to the resource is forbidden." error.
To rule out anything in my report, I started a new desktop project, connected to a different Excel doc with Web connection to the new Excel stored on Sharepoint and got "Access to the resource is forbidden." in the data connection dialog (where if successful it asks you which tables you want to load).
Like others above problem was resovled when I selected Clear Permissions (under Data sources in current file in my case) then logged in again with my organizational account.
Would be nice if it didn't do this.
Chris.
I'm experiencing the same problem. REST API connection works fine in Version: 2.64.5285.741 64-bit (November 2018) but fails with Expression.Error: Access to the resource is forbidden. with any newer version. I've tried clearing and resetting permissions to all data sources in my file, and setting the .pbix file option to ignore privacy levels but nothing works.
I want to use new features from recent desktop releases for my models, but I'm blocked because of these issues and can't improve any of my production models. PBI team are you aware of this issue? Please resolve the problem and support REST API based connections, I have several efforts that take advantage of them.
Hi Mow700,
We did some mad troubleshooting to solve this one, but we finally managed to solve it, but only in an ugly way.
It seems the static credential evaluation under dataset settings in PowerBi Service kept hanging on to some old/obsolete credentials.
In the beginning we were not able to detect this as the error message, did not reveal the full URL in the textbox or the tooltip. Support was not able to help, so what do you do? F12 Chrome inspector, and sure enough it revealed the full info including token etc. There we saw that the access token was some old obsolete token, that is why, somehow, not matter what we did, it kept returning Access to ressource is forbidden.
So how did we solve this?
We tried deleting the file and publishing a new one, but nothing helped.
Apparently this seems to be cached in some way.
In the end we setup a proxy to always return success for the static data source credential evaluation.
Then we rely on the access token passed in the URL for the actual authentication.
I know it is not pretty, but it worked.
I am curious to know if your root cause is the same, please let me know.
Concerning header based authentication I too attempted to build my own proxy to handle authentication but unfortunately my issues persisted. I'm definitely unsuccessful in refreshing data sources that use http header based authentication in the service. The file refreshes fine in the desktop but as soon as it's published to the service scheduled refresh is disabled with one of 2 messages:
I reached out to MSFT product support and they confirmed this is not supported, it does not work in Dataflows either.
Concerning the Exception of type 'Microsoft.Mashup.Engine.Interface.ResourceAccessForbiddenException' was thrown. error, I am still waiting for MSFT product support to get back to me. I can reproduce the problem with the December 2018 desktop release but the November 2018 release always works. I gave up on this particular source and found a different API endpoint that worked.
Hi mow700,
Sorry to hear that it did not work for you. With our proxy we set it up to always return 200, to make sure the static crendetial check in PowerBi succeeds, did you do that too?
The problem is that static credential check in dataset settings. It some how caches old url and parameter values. And there is not apparent way to clear that cache, not even deleting the file and publishing it again.
That is why your proxy must always return 200, also if you provide invalid credentials. That will trick the static credential check.
Then of course the URL + parameters should enforce correct auth.
Let me know if it works.
I encountered the same issue as well. I am getting the following message Expression.Error: Access to the resource is forbidden after the version update!
I ran into a very similar issue yesterday when I updated to the December release of the Desktop
The report where I encountered this issues pulls data from a RESTful web service API using anonymous authentication
I could not refresh the data in the desktop because I couldn't get past the "access to the resource is forbidden"
I reverted back to the November release,Version: 2.64.5285.741 64-bit (November 2018), of the desktop and was able to refresh just fine
I am also now having issues with my report the uses the same RESTful web service API data sources not being able to refresh in the service, where they were able to just fine last week, up to this past Sunday, but that is another story
Good luck and looking forward to seeing additional comments on your issue
Thanks for confirming it's not just me. I just found a copy of the November release and I've learned two things from this:
I tried re-signing back into the dataset, but that didn't help. I was also planning on setting my reports up for service refreshes, but since all my datasets are accessible through the web service API, that's going on hold.
T.
Yes, I do the same, I keep at least the past 3 months of the desktop installs
To clarify, not all of my reports that use web servce calls fail to refresh in the service
It seems to be one, though it refreshed just fine until this past weekend
It is not much different than the other reports that work
The issue I am seeing in the service is I keep getting the error "The credentials provided for the Web source are invalid"
Good luck
Hi blopez,
I am facing exactly the same issue as you, it is driving me CRAZY!
I have spent several days troubleshooting now.
This error seems random or at least affect only a portion of my data sources.
Here is how I tested:
-Created 3 test cases; Workspace A, Workspace B and Workspace C, each with an individual Access Token.
-Verified that access credentials to web content are solid for each Workspace and Access Token combination (via Azure and alternative method)
-Created a simple pbix file in PBI Desktop to pull one dataset from a URL that includes Workspace and Access Token
-Setup parameters in query editor for Workspace and Access Token
-Verified that all 3 cases refresh perfectly in PBI Desktop, even swapped between the 3 Workspace and Access Token combinations several times, no problems at all.
-Published pbix to PBI Service
This is where things start to get crazy!
-I edited the parameters for Workspace and Access Token
-For cases A and C there are no issues, PBI Service accepts the credentials
-For case B I face the issue, credentials are supposedly invalid. This is the error I get: Failed to update data source credentials: The credentials provided for the Web source are invalid.
-I swapped parameters several times between cases A, B and C, and the result is consistent: A and C succeeds, B fails.
And here is the REALLY crazy part – when I do a manual refresh the dataset with B’s Workspace and Access Token parameters IT WORKS!
So, what is going on?
My only theory is that PBI Service has an issue in “Dataset -> Settings -> Data Source Credentials” with the function that check for data access. As a result, it fails when checking this particular token of case B. As I said the token is valid, and PBI Service can refresh the dataset manually.
My last idea to solve this, is to create a new access token and hope this is simply a glitch in PBI Service.
What are your thoughts?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
86 | |
82 | |
64 | |
49 |
User | Count |
---|---|
124 | |
110 | |
88 | |
68 | |
66 |