Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Embed Power BI using restful API error

I am using restful API to embed a dashboard, but I am getting the following error while the frame is loaded in the browser

 

Uncaught Error: Report id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute 'powerbi-report-id'.

 

Here is the portion of code on pbiembedservice.py

 

# Get embed token

        # embedtokenurl = 'https://api.powerbi.com/v1.0/myorg/GenerateToken'

        embedtokenurl = 'https://api.powerbi.com/v1.0/myorg/groups/ceaa1d50-6123-47b3-98ce-0aedf7c14141/dashboards/9a43729e-9912-4ca7-adfe-c91498e91d7e/tiles/ea3d500d-2a18-41fc-ac7d-a6209b6a7c18/GenerateToken'

        body = {'datasets': []}

        if datasetId != '':

            body['datasets'].append({'id': datasetId})



        if app.config['REPORT_ID'] != '':

            body['reports'] = []

            #body['reports'].append({'id': reportId})

            body['reports'].append({'id': app.config['REPORT_ID']})



        if app.config['WORKSPACE_ID'] != '':

            body['targetWorkspaces'] = []

            body['targetWorkspaces'].append({'id': app.config['WORKSPACE_ID']})



        apiresponse = None



        try:



            # Generate Embed token for multiple workspaces, datasets, and reports. Refer https://aka.ms/MultiResourceEmbedToken

            print(body)

            print(embedtokenurl)

            #apiresponse = requests.post(reporturl, data=json.dumps(body), headers=headers)

            apiresponse = requests.post(embedtokenurl, data=json.dumps(body), headers=headers)

 

4 REPLIES 4
lbendlin
Super User
Super User

You are trying to embed a dashboard. Is that your intention?

Anonymous
Not applicable

Yes. You are right, I am trying to embed dashboard into website.

why? What's the rationale for that?  Dashboards and dashboard tiles are not interactive. You don't really want to do that.

Anonymous
Not applicable

Ok You mean the visuals we pin to make a dashboard are not interactive? Then If I want to combine visuals/report from multiple dataset how could I do that in powerBI? I know in the reports visuals are interactive, so do you suggest to make reports with multiple visuals?

Please let me know.

 

Thank You!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.