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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Power BI is hosted in AWS EC2 Machine and to access Power BI Service URL in dotnet and angular

Power BI is hosted in AWS EC2 Machine and we want to access Power BI Service URL in .net and angular applcation, but we are getting access issue. We have application id, workspace id, dataset id and report id of the Power BI, but we do not have application screte id to get access token. Can you pleaes help us how to get access token, application screte key,client id and access key to call the power bi service from .net and angular application.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

What type of dataset are you test? General dataset or push dataset? If you mean push dataset, please refer to the following tutorial document to know how to get the access token:

Get an authentication access token 

If you mean the general dataset, you can check rest API document to generate the operation tokens: (notice: you need to register an application on azure side for permissions to use rest API)

Embed Token - Generate Token 

Register an Azure AD application to use with Power BI 
Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

What type of dataset are you test? General dataset or push dataset? If you mean push dataset, please refer to the following tutorial document to know how to get the access token:

Get an authentication access token 

If you mean the general dataset, you can check rest API document to generate the operation tokens: (notice: you need to register an application on azure side for permissions to use rest API)

Embed Token - Generate Token 

Register an Azure AD application to use with Power BI 
Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi, Thank you.  

 

I am able to generate access token in .net application after connecting to azure

 

Need Help - 

 using (var client = new PowerBIClient(new Uri(ApiUrl), m_tokenCredentials))
{
// Get a list of reports.
var reports = await client.Reports.GetReportsInGroupAsync(WorkspaceId);

...

}

when i am fetching data for workspace, it is giving as unauthorized.

Error

            Status: Unauthorized (401)
Response: 
RequestId: f9519e20-c04f-4488-aee1-9ca3be8b3326

 Please help me with your suggestion.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.