web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Embed Token for Power BI Embedded Report

(0) ShareShare
ReportReport
Posted on by 897

Hi all,

Does anyone knows how to write the code for "Generate Token" for Power BI report in Dynamics 365 F&O ?

I got this video link, but it is too general, not specific to F&O.

https://www.youtube.com/watch?v=5OF0s2t0N3w&t=2470s

Reason to use this, because my Power BI report has Roles in it. I mean so far what I did are:

1. Create Power BI report using Power BI Desktop

2. In Visual Studio, create AxResource and link to that PBIX

3. Create a Workspace form to call that AxResource

4. Create Menuitem Display

5. Build

At this part, the report is running. However if I added Role in PBIX, it causing me error.

There is also this reference :docs.microsoft.com/.../embed-sample-for-customers

but it is again too general and it is more for JavaScript, with no clue how to apply it in F&O code.

Can I get some help regarding this ?

Thanks,

I have the same question (0)
  • Tony zhong Profile Picture
    897 on at
    RE: Embed Token for Power BI Embedded Report

    Yes,

    I  raise a support ticket to Microsoft on this, and get the same feedback. They all said I need to create different data set for each Role that I want and obviously create different Power BI report (PBIX), so one F&O menu item (attached to one PBIX) for each Role.

    And of course, remove the role in PBIX.

    But I wonder with Will Wu replied above, unfortunately, the link is too complicated  for my "simple" brain to follow. So at the moment, I accept with what Microsoft support said.

    Thanks to confirming as well.

  • Verified answer
    Crispin John Augustine Profile Picture
    37,081 on at
    RE: Embed Token for Power BI Embedded Report

    you have to apply role to the (workspace) menu item, not PBIX

  • WillWU Profile Picture
    22,359 on at
    RE: Embed Token for Power BI Embedded Report

    Hi Tony,

    Please refer to the following blog:

    http://terrychoo.com/how-to-get-authentication-token-for-dynamics-365-finance-and-operations-on-premise-and-cloud-deployments-to-run-rest-api-using-powershell-and-the-client-credentials-grant-method/

    Hope this helps.

  • Tony zhong Profile Picture
    897 on at
    What is the steps to create EmbedToken for Power BI Embedded report

    Hi all,

    Does anyone knows how to write the code for "Generate Token" for Power BI report in Dynamics 365 F&O ?

    I got this video link, but it is too general, not specific to F&O.

    https://www.youtube.com/watch?v=5OF0s2t0N3w&t=2470s

    Reason to use this, because my Power BI report has Roles in it. I mean so far what I did are:

    1. Create Power BI report using Power BI Desktop

    2. In Visual Studio, create AxResource and link to that PBIX

    3. Create a Workspace form to call that AxResource

    4. Create Menuitem Display

    5. Build

    At this part, the report is running. However if I added Role in PBIX, it causing me error.

    There is also this reference :docs.microsoft.com/.../embed-sample-for-customers

    but it is again too general and it is more for JavaScript, with no clue how to apply it in F&O code.

    Can I get some help regarding this ?

    Thanks,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans