Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18119

Display Power BI reports in website for non Power BI users

$
0
0

Hi All,

 

I have been exploring the new feature using article at samples wherein the non Power BI users can now access the Power BI reports if they have access to the .Net website which acts as a host.

 

Please see below code snippet I have used,

 

private Task Authorize()
        {
            return Task.Run(async () =>
            {
                AuthenticationContext authenticationContext = new AuthenticationContext(AuthorityUrl);
                UserCredential userCredentials = new UserCredential();                 var result = await authenticationContext.AcquireTokenAsync(ResourceUrl, "clientId", userCredentials);
                string newToken = result.AccessToken.ToString();
            });
        }

 

 

The above code runs fine when I launch the application from Visual Studio and I am able to view the reports.

 

However when I publish to an IIS site, the website does not show the report and logs the below error to console.

 

Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: unknown_user_type: Unknown User Type

Could someone help me in identifying and resolving the problem.

 

Thanks in advance,

 

Vinayak

 

 

 

 


Viewing all articles
Browse latest Browse all 18119

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>