<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D50Z00008G7V3sSAFOkta Classic EngineIntegrationsAnswered2025-06-14T10:29:51.000Z2016-03-02T14:43:50.000Z2017-07-25T00:43:58.000Z
SDK Case Sensitivity
I recently build a back-end admin app using Okta's .NET SDK.  One of the end-users noticed that the username value had to be entered in the same case as what's stored in the system.

 

This behavior is different from the Okta login form.  Also, the REST API does not perform a case sensitive comparison.

 

Considering that most Okta usernames are email addresses, can we assume that case-insensitive comparisons will always be supported?  If so, the "getByUsername( )" method in the .NET SDK should be fixed.

 

0EMF00000009SVE

JoshuaA.48048 likes this.
  • JP Manansala (Okta, Inc.)

    Hi Jung,

     

    Thanks for posting your inquiry in Okta Community.

     

    Definitely you have a point here. I will send REQ ticket to Engineering Department on this behaviour.

     

    Please let me know if you need any additional information. Thank you.

     

    Best,

     

    JP
    Expand Post
  • RobertZ.75827 (Customer)

    Is there any news about this issue? I am using the same function and this is affecting me as well. Thanks!
  • RobertZ.75827 (Customer)

    You can get around this (I believe) by using a Linq query against the return value of GetUsersClient():

     

    var user = oktaClient.GetUsersClient().FirstOrDefault(x => string.Equals(x.Profile.Login, username, StringComparison.CurrentCultureIgnoreCase));
  •       Try below code.             
    1.  OktaClients.OktaClient oktaClient = new Okta.Core.Clients.OktaClient(ApiToken, SubDomain);  //try with LinQ due to issue with Email case sensitive oktaUser = oktaClient.GetUsersClient().FirstOrDefault(x => string.Equals(x.Profile.Login, model.Email, StringComparison.CurrentCultureIgnoreCase));
     

    Expand Post
This question is closed.
Loading
SDK Case Sensitivity