.NET SDK AuthClient.Authenticate issue Skip to main content
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Chin BaeChin Bae 

.NET SDK AuthClient.Authenticate issue

It seems like calling AuthClient.Authenticate() changes the context of all API method calls to that of the user. So other API calls throw exceptions due to HTTP forbidden responses from the server.
var apikey = "somekey";
var env = "https://dev-999999.oktapreview.com";
var username = "user@company.com";
var pwd = "somepwd";

var oktaClient = new OktaClient(apikey, new Uri(env));

var authClient = oktaClient.GetAuthClient();
var result = authClient.Authenticate(username, pwd); //On 2nd try comment this out. There will be no exception
var appClient = oktaClient.GetAppsClient();
var applist = appClient.GetList(); //throws exception if AuthClient.Authenticate() is called
If this is by design, is there a way to do a user challenge without authenticating? My goal is challenge the user and then check if the user has access rights to the application. There's no way to do this if all calls subsequent to AuthClient.Authenticate() throw exceptions.