I am working on an on-premise IFD installation of CRM 2015. I have followed the instructions here to configure CRM and AD FS to allow an external application access to the odata endpoint.
I have also created a local solution based on the code samples provided here and here.
I am running into an issue trying to acquire a token from the authentication context. When I invoke the AcquireToken(resource, clientId, redirectUri) I get an exception that indicates a "user canceled authentication".
The code I am using has been copied directly from the sample projects and updated only to use my URL, ID, and redirect URI. I have no idea what could be wrong or how to begin to troubleshoot the problem. Any help would be appreciated.