Forum Discussion

kavitakashish83's avatar
kavitakashish83
New Member
9 years ago
Solved

Auto Sign-in to Embed Power BI report in web application

Hi All,   I am able to show filtered power BI reports in a web application. But I need to auto sign-in using c# to AZURE ACTIVE DIRECTORY to access power BI reports.   Below is my ACTIVE DIRECTOR...
  • Eric_Zhang's avatar
    Eric_Zhang
    9 years ago

    kavitakashish83

     

    Then see this demo APP OWNS DATA. On license aspect, do note this approach would need Power BI premium license if you'd share your report to the users without Power BI account.

     

               // Create a user password cradentials.
                var credential = new UserPasswordCredential(Username, Password);
    
                // Authenticate using created credentials
                var authenticationContext = new AuthenticationContext(AuthorityUrl);
                var authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, ClientId, credential);