M
Meenakshi2019
Guest
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.
Continue reading...
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.
Continue reading...