Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Can not authenticate my account using power BI SDK

I am new to Power BI API and following the tutorial available in the msdn documentation to embed a power BI report in an website that uses a .NETSDK.

I am an Azure active directory user and I have downloaded power BI using my active directory account. I followed embedding setup tool link to setup an application as Native user and get the application id to be used for API calls. One of my team member designed a power BI report and published the workspace sharing with me. My AuthenticationType is MasterUser. I downloaded the sample application available in GitHub as mentioned in the above tutorial. I have been made an admin for my power BI pro account and trying to integrate the report in the website. I replaced the credentials and other ids as as described in the tutorial. But this gives me the following error-

unknown_user_type: Unknown User Type

This is the piece of code that's failing during AquireTokenAsync call.

private async Task<AuthenticationResult> DoAuthentication()
    {
        AuthenticationResult authenticationResult = null;
        if (AuthenticationType.Equals("MasterUser"))
        {
            var authenticationContext = new AuthenticationContext(AuthorityUrl);

            // Authentication using master user credentials
            var credential = new UserPasswordCredential(Username, Password);            authenticationResult = authenticationContext.AcquireTokenAsync(ResourceUrl, ApplicationId, credential).Result;
        }

        return authenticationResult;
    }

Please help me solve this. Thanks in advance.

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.