cancel
Showing results for 
Search instead for 
Did you mean: 

Error while creating new report

Hi,

I won't be able to render report if i call to cerate a new blank report. I'm using service principle and workspace has access to that group.

 

Request ID: 3b53dfd6-ebe9-7569-8845-91093ec6898c

 

 

 

 

var pbiReport = pbiClient.Reports.GetReportInGroup(args.GroupId, args.ReportId);
                var dataset = await this._datasetService.GetByIdRaw(args.GroupId, pbiReport.DatasetId).ConfigureAwait(false);

                var parameters = this.BuildTokenRequestParameters(dataset, TokenAccessLevel.Create, true);
                var createToken = await pbiClient.Reports.GenerateTokenForCreateInGroupAsync(args.GroupId, parameters);

                if (createToken == null)
                {
                    throw new NullReferenceException("Failed to generate embed token");
                }

                return new CreateReport
                {
                    DatasetId = dataset.Id,
                    EmbedUrl = pbiReport.EmbedUrl,
                    EmbedToken = createToken
                };

 

 

 

Embeding from JS

 

 

  const config = {
        tokenType: models.TokenType.Aad,
        accessToken: accessToken,
        embedUrl: embedUrl,
        datasetId: datasetId
    };
    var report = powerbi.createReport(reportContainer, config);

 

 

pbi-create-new-report-error.png

Status: New
Comments
v-chuncz-msft
Community Support
mahmood-ri
New Member

Hi @v-chuncz-msft 

Thanks for your reply. I've checked and using appropriate options.

 

I can see same 403 issue appearing in demo as well.

https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html

 

 

pbi-create-mode.png