Forum Discussion
mittalpatel130
6 years agoHelper III
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.
- It is Secure Embed.
- It is for our Organization, so user owns data.
- ServiceNow Portal uses the same Azure Active Directory as Power BI does.
- 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.
- 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.
- Created Azure AD Web App and got the ClientID and Client Secret.
- 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.
- Successfully generated Bearer Access Token using Post API - https://login.microsoftonline.com/common/oauth2/token
- Once got the access token, we're able to embed the report using JavaScript.
Can we please get any help on #2?
Thank you.