-
Notifications
You must be signed in to change notification settings - Fork 214
CreateAuthenticationDialog - The method or operation is not implemented. #879
Comments
We don’t support username password based flows in .net core. But at the same time adfs v3 does not support username password based authentication (resource owner flow) either. |
Regarding username/password, I was referring to this flow. For example, on Windows using .NET 4.5, the following code will use the credentials of the logged in user automatically.
If I were to use I'm able to package in domain credentials using the HttpClientHandler in .NET Core (so I have the ability to run in Linux)
I was inquiring (and hoping!) this library would support something similar. |
I do not believe above will work with Please read If you use PromptBehavior = Never and the token does not exist in the cache, or needs to be refreshed with UI, the call to AcquireTokenAsync will fail with an exception of type AdalException |
markdwags, the flow you describe above is an interactive flow which is not supported in .NET core as .NET core does not offer a Web browser Indeed @angshuman-agarwal, indeed one should what is described in recommended pattern to acquire a token in public client application. you should first try the cache, and if this fail you try the interaction. Also see this summary for which platform supports which flow: summary for public client applications __ |
@jmprieur Yes ; but that poses an issue. I am not able to make my app seamless because in Can we make the browser hidden by passing an optional parameter to Something like : |
@angshuman-agarwal if you use systematically AcuireTokenSilentAsync before your call to AcquireTokenAsync( with Auto), then you will not see any browser. |
Sorry, that is not true. I followed this pattern here where I call
Please also read the note here for
|
@angshuman-agarwal. I'm confused about what you want to achieve This is an interactive flow. so the very first time the user uses the application, s/he will have to sign-in interactively. Then, provided you have implemented a token cache serialization (only needed on .NET Framework and .NET Core), you won't have to re-sign in the user. Now, if you are in an enterprise scenario, with the user's machine domain or AAD joint, you'd want to use the Windows integrated authentication flow, which does not show a browser (but that was not my understanding from the thread above. Sorry if I missed something) |
I'm trying to get past the part that requires someone to sign in interactively -- where it would use an Active Directory username and password (stored in a config or obtained some other way) that I pass in and it allows me to bypass the interactive window and use the credentials that way, Specifically, my use-case is attempting to get this token from an AWS Lambda function and then using that token to interact with the CRM Web API with that token. Unfortunately, my "work around" has been to have a Windows Service installed that gets that token every minute, then pushes the value to AWS Lambda so the function can use the token. I'd love to not have this extra service, instead allow the Lambda function to obtain this token. |
@markdwags : thanks for sharing your scenario. Did you try to use the Username/password flow? |
I'm attempting to acquire a token from ADFS 3.0 using OAuth2 using .NET Core. Using .NET 4.5, I have no issues because of a combination of PromptBehavior.Never and it automatically handling in the passing in the credentials of the Windows user who is logged in.
In .NET Core, that isn't available (long term this will run from an AWS Lambda function) but I'm unable to find a way to package in the username/password that has permission to auth to get the token to put into the Authorization header in the HttpClient in a way that works with CRM 2016.
ADFS 3.0 OAuth2 with the ADFS Client is very specific, and requires that you pass in a resource (which is the ADFS defined URL), the client ID (created on the ADFS server with Add-AdfsClient), and the redirect URL (also defined using Add-AdfsClient).
It's kicking out this error.
Essentially, I need a way to bypass this auth dialog and input my own domain, username and password that it will use to authenticate to get the token.
Thanks!
The text was updated successfully, but these errors were encountered: