Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Power BI Secure Embed (User Owns Data) & Single Sign-on integration using JavaScript

Hello - 


We're using Power BI Premium Capacity and trying to embed Power BI Reports to ServiceNow Portal (JavaScript) and here is the scenario. 


  1. It is Secure Embed.
  2. It is for our Organization, so user owns data. 
  3. ServiceNow Portal uses the same Azure Active Directory as Power BI does.
  4. In this custom integration, we want to implement Single Sign-on so that users don't have to sign in again to view the reports while being on the ServiceNow Portal. 
  5. All custom code has to be JavaScript, because it will go with ServiceNow Portal Page. 

Is this possible using JavaScript? Here is what we've tried so far. 

  1. Created Azure AD Web App and got the ClientID and Client Secret.
  2. Get Azure AD Authorization Code using Web App - We're able to execute below URL and get the Authorization code in the URL. We couldn't find JavaScript code to generate this Authorization code using GET method.<<clientid>>&response_type=code&redirect...>>

  3. Successfully generated Bearer Access Token using Post API -
  4. Once got the access token, we're able to embed the report using JavaScript. 

Can we please get any help on #2? 


Thank you.

New Member


did you find any way to do it? If so, Can you please share the process of embedding report on servicenow portal. I successfully got step 1,2,3. but unable to solve step 4. can I please get some help with step 4. If you have previously done it. 






Here is the playgroud I used to test my embed reports and copy paste the javascript for embedding in ServiceNow.


Let me know if this works for you. 

Hello I am this at the moment with php but I do not know what to start with I have already done the azure ad configuration but I am missing more than coding I could have some help?

Helpful resources

PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!


The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.


Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Kudoed Authors