Hello everyone,
I'm encountering an issue while trying to embed Paginated Reports in with AllowEdit option as True. Every time I add to allowEdit a Paginated Report, I receive the Response message: "Resource access type 'Edit' unsupported for Paginated Reports."
I've searched through the documentation, but I couldn't find any relevant information about this specific error.
Has anyone else experienced this issue? If so, how did you resolve it? Any insights or suggestions would be greatly appreciated.
In this document it is mentiond that allowEdit must set to false
Embed a paginated report - Power BI | Microsoft Learn
and in another document its not mentioned
Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Here is a code snippet
static async Task Main(string[] args)
{
var credential = new ClientCredential(Constants.ClientID, Constants.ClientSecrete);
// Authenticate using created credentials
var authenticationContext = new AuthenticationContext(Constants.AuthorityURL);
var authenticationResult = await authenticationContext.AcquireTokenAsync("https://analysis.windows.net/powerbi/api", credential);
if (authenticationResult == null)
throw new Exception("Report Authentication Failed");
var tokenCredentials = new TokenCredentials(authenticationResult.AccessToken, "Bearer");
using (var client = new PowerBIClient(new Uri("https://api.powerbi.com/"), tokenCredentials))
{
{
var reports = await client.Reports.GetReportsInGroupAsync(Guid.Parse(Constants.WorkspaceId));
// No reports retrieved for the given workspace.
if (!reports.Value.Any())
throw new Exception("No reports were found in the workspace");
foreach (var report in reports.Value)
{
Console.WriteLine($"Report Name: {report.Name}");
Console.WriteLine($"Report ID: {report.Id}");
Console.WriteLine();
var tokenRequest = new GenerateTokenRequestV2(
reports: new List<GenerateTokenRequestV2Report>() { new GenerateTokenRequestV2Report(report.Id, true) },
datasets: null,
targetWorkspaces: new List<GenerateTokenRequestV2TargetWorkspace>() { new GenerateTokenRequestV2TargetWorkspace(Guid.Parse(Constants.WorkspaceId)) },
identities: null
);
var tokenResponse = client.EmbedToken.GenerateToken(tokenRequest);
}
}
}
}Can someone guide me?
Thank you!