Last post Feb 20, 2018 06:34 AM by Brando ZWZ
Feb 19, 2018 12:50 PM|senthil.tmr|LINK
I am new to Web Api. We are integrating our Web service to one of our customer Web API which require the bearer token from AAD to get the data from the customer service.
The scenario is like, our Web application call our internal asmx service which call the LOB service and collect the data and based on that data, the service will decide whether to call the customer service or not. I have read the following article
and complete the 50% of the work
https://www.codeproject.com/Articles/1121503/Integrate-Azure-AD-B-C-with-ASP-NET-MVC-Web-App-Pa. But this article covered the MVC application, which is having Sign in page to key in the user name and password. But it cannot be done in our case since it
is a back end call. Can you please guide us how to get the bearer token from AAD using OpenIDconnect?
Feb 20, 2018 06:34 AM|Brando ZWZ|LINK
But it cannot be done in our case since it is a back end call. Can you please guide us how to get the bearer token from AAD using OpenIDconnect?
According to your description, I suggest you could try to use this library.
Microsoft. Rest. ClientRuntime. Azure. Authentication
Then we can use the function UserTokenProvider.LoginSilentAsync(nativeClientAppClientid, domainName, userName, password) to get our credentials without pop-up.
More details, you could refer to below answer.