Forum Discussion
InvalidRequest: Resource access type View unsupported for Reports
- 4 years ago
It turns out the endpoint we are using is fine. Microsoft themselves have example code using this endpoint for View operations.
The problem ended up being a very subtle change on Microsoft's side where a json field name was changed from "Name" to "name", which broke a case-sensitive field lookup in our code.
Hi,
I'm not sure what have changed in Power BI side, but can you please explain why you call this specific endpoint? According to the documentation it should only be used when generating an embed token to be used for creating reports Embed Token - Reports GenerateTokenForCreateInGroup - REST API (Power BI Power BI REST APIs) | Microsoft Docs
That's probably why you get an error when you specify "accessLevel"="view" in the request. I believe only "Create" is supported.
If you're just embedding existing report\s you should use a different endpoint like this one Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Docs
It turns out the endpoint we are using is fine. Microsoft themselves have example code using this endpoint for View operations.
The problem ended up being a very subtle change on Microsoft's side where a json field name was changed from "Name" to "name", which broke a case-sensitive field lookup in our code.