We are writing a WCF service which has to integrate with Dynamics CRM 2016 Online. I'm trying to authenticate using ADAL, using method AcquireTokenAsync()
. Problem is, it displays a pop-up box, prompting the user for credentials. Naturally, our application being a service, this isn't what we want. We've been searching for a way to authenticate without having this pop-up box.
There is a class called AuthenticationContextIntegratedAuthExtensions
, which is supposed to assist with "username/password flow". It has the single method AcquireTokenAsync
, which suppresses the pop-up box, but we haven't found any way to pass the password to it. When run with just the username, it raises the exception that basically says "no password was supplied".
Does anyone have any idea how to work around this? Doesn't even have to be ADAL. Just something to acquire the OAuth token.