Forum Discussion
Power BI : Paginated Visual from Visualization Throwing Unauthorized Error 401 when being Selected
Hi Anonymous ,
The 401 error means that there’s no permission to access the resource.
Here are some steps you can take to troubleshoot and resolve this issue:
1. Check your Service Principal permissions: Make sure your service principal has the necessary permissions to access the resources. You can do this by going to the Azure portal, navigating to the Azure Active Directory section, and checking the permissions of your service principal.
2. Check your token: Ensure that the token you're using is valid and has the necessary scopes to access the resources.
3. Check your report settings: Make sure that the RDL report you're trying to access is in the same workspace as the PBIX report and that it's accessible to the service principal.
4. Check your code: Ensure that your code is correctly generating the token and setting the embed configuration. You might want to try hardcoding some values to see if the issue is with the token generation or the embed configuration.
Maybe the token is not fetched, you can add an await:
var tokenResponse = await powerbiclient.Reports.GenerateTokenInGroup(groupID, reportID, RequestParameters );
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
We are generating token for a selected report which user want to preview by passing report ID:
My questions is:
1) Is it even possible to replicate paginated visual feature in IFrame the way we have in Power BI Desktop or service. In Power BI Desktop/service user logged in with their email ,they have access to workspace and reports so when they select paginated visual feature in any report page ,they are able to see all RDL Reports and can connect by clicking connect to report button or I would see embed RDL report within pbix.
2) In IFrame we generate token for that specific report to preview ,power bi visualization along with filters everything coming in Iframe but when we select paginated visual we end up with above error,how can we see all RDL reports in iframe the way we see in powerbidesktop or powerbi service , this token is for that particular selected report ,do we need to generate any other token (token at workspace level ?) to see all rdl reports and how can we replicate similar behaviour *embedding rdl within pbix) what we have in desktop or power bi service in Iframe.