Forum Discussion
Get Data from Web API secured by Azure AD - Could not authenticate with the credentials provided
Hi,
I have the following case, and I hope I could get help:
- I created a .NET core API without authentication. Published it to an Azure App service.
- That Azure App service is then secured via Active Directory app registration, I followed the (Alternative method) section from this link: https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad
- Now I am trying to create a Power BI report. Get Data > Other > Web:
- When I hit Connect, I get the following error:
- It is strange that the authentication fails as I use the same credentials when I signed in and got me connected in the first place. Now when trying to connect to the api to get the data, this happens. Am I missing something, or not doing it right? I am using the very same credentials in Azure AD.
- Anonymous7 years ago
nnosaj,
I don't think it is possible to directly connect to the web api using AAD authentication, please check if ss78's method works in your scenario.
Regards,
Lydia
3 Replies
- AnonymousNot applicable
nnosaj,
I don't think it is possible to directly connect to the web api using AAD authentication, please check if ss78's method works in your scenario.
Regards,
Lydia- nnosajFrequent Visitor
Hi Anonymous,
Thanks for the suggested method. I think that would work in my scenario when converted to C#. However, at present it will be an unnecessary overhead as we had opted for a simpler form of authentication, which is just a simple custom API key authentication, and it worked seamlessly on my Power BI report. It will be really nice to have Azure AD as authentication if only there could be a more direct and easier approach to it in Power BI.
Kind Regards,
- mattmassonMicrosoft Employee
Please see Authentication with a data source - Power Query | Microsoft Learn for details on how to make this work.