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
Hi, we're receiving random errors when sending data via Rest API using the following endpoint:
https://api.powerbi.com/beta/:ID/datasets/:ID/rows?key=SECRET
The errors:
Status code: 401
Status name: Unauthorized
{
"error": {
"code": "UnableToFindKeyInDBorCacheException",
"pbi.error": {
"code": "UnableToFindKeyInDBorCacheException",
"parameters": {},
"details": [],
"exceptionCulprit": 1
}
}
}
{
"error": {
"code": "KeyFoundInDeletedResourceKeyCacheException",
"pbi.error": {
"code": "KeyFoundInDeletedResourceKeyCacheException",
"parameters": {},
"details": [],
"exceptionCulprit": 1
}
}
}
~10% of requests return those errors, inclusive of if we send exactly the same payload on requests.
Any reason why this is happening?
Hi @matiaslopezd ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @matiaslopezd ,
What is your role in the workspace? After which step did you start reporting errors?
As far as I know, the permissions of Power BI are all based on the users. So an App can't act as a user. Please refer to developer/power-bi-permissions where all the descriptions have "user".
Regarding "Tenant.ReadWrite.All", the documentation above also has a description. Actually, these permissions only can retrieve the profiles rather than data. Please refer to admin/reports_getreportsasadmin.
One simple proof we can see is that even an admin can't access all the App workspaces.
I have also found a similar post, please refer to it to see if it helps you.\
Unauthorized (401) Embedded using the samples Node and .NET
The problem was in Step 7 - Enable workspace access that states Sign in to Power BI service > workspace you want to enable > Workspace access > Access pane, > copy the service principal to the Enter email address text box.
Because the email of the global admin was already filled out, I overlooked the actual requirement of entering the service principal ("Enter email address" was confusing).
If it still does not help, please provide more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I don't understand why I need to set permissions to use the Rest API stream to push data when provides me an API key.
I think is because the current state of API is in beta.
Hello 🙂 did you get a solution? I have the same problem.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Check out the July 2026 Power BI update to learn about new features.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 21 | |
| 7 | |
| 7 | |
| 6 | |
| 4 |