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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.