Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI All,
I have written a web api where we are generating the csv file in which some data will be present. This web api is hosted on azure portal and we have azure AD authentication mechanism if we try to execute any method written in web api. This works fine in browser if i directly executes the api. However, we are trying to consume the same api in power bi but I am getting the below error.
invalid_resource: AADSTS50001: The application named was not found in the tenant named . This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Below is short api code where I am returning the resposnse
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StreamContent(ms);
response.Content.Headers.ContentLength = ms.Length;
response.Content.Headers.ContentType = new MediaTypeHeaderValue(CsvContentType);
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment");
response.Content.Headers.ContentDisposition.FileName = Path.GetFileName("myfilename.csv");
return response;
I am executing this api from GetData => Web => enter wep api => then on Organizational Account it ask to enter the credentials where I am putting the organizational credentials. then I am getting the below mention error.
So, where I am lacking in this ?
Any help on this appreciated
@rohitpundlik,
Directly use Power Query to call the Web API following the guide in Xiaoxin's reply in this similar thread, then check if you get any errors.
Regards,
Lydia
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.