Forum Discussion
Create Report in Embedded Power BI with GenerateTokenRequestV2
I was able to resolve the issue...
I changed my code to use the same “pbiClient.EmbedToken.GenerateToken” API call as view/edit rather than the “pbiClient.Reports.GenerateTokenForCreateInGroup” API call. My understanding was that report creation required the more specific call for creating a report in a group. However, it appears that it was the cause of the issue, and is still a v1 call.
Using the GenerateToken API instead did resolve the issue. The custom SaveAs dialog now works and allows me to save to the target workspace. I simply provide Guid.Empty for the reports portion of the GenerateTokenRequestV2 and include the Dataset and targetWorkspace.
Thanks for sharing the fix here. I am still having the same issue as your original issue.
In the UI code are you specifying the targetWorkspaceId on the SaveAs call (via the SaveAsTriggered event) or is it enough that your token request includes the target workspace?