{"id":810,"date":"2020-12-03T09:08:40","date_gmt":"2020-12-03T06:08:40","guid":{"rendered":"http:\/\/as7ablog.com\/kinan\/?p=810"},"modified":"2021-09-23T21:14:18","modified_gmt":"2021-09-23T18:14:18","slug":"keycloak-returns-null-username-error","status":"publish","type":"post","link":"https:\/\/as7ablog.com\/kinan\/?p=810","title":{"rendered":"Keycloak Returns null username Error"},"content":{"rendered":"\n<p dir=\"ltr\">When your application is using keycloak to authenticate to Microsoft Active Directory LDAP service, You may receive the error &#8220;keycloak.models.ModelException: User returned from LDAP has null username!&#8221; in the logs and the login fails.<\/p>\n\n\n\n<p dir=\"ltr\">You may want to look at this article (<a href=\"https:\/\/edwin.baculsoft.com\/2019\/10\/fixing-error-null-username-when-integrating-redhat-single-sign-on-to-active-directory\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/edwin.baculsoft.com\/2019\/10\/fixing-error-null-username-when-integrating-redhat-single-sign-on-to-active-directory<\/a>) for configuration and initial troubleshooting.<\/p>\n\n\n\n<p dir=\"ltr\">There are so many reasons for that, and you probably searched a lot and tried many of it already before you reach this page.<br>So, here is one more thing for you to try:<br>Set proper naming values for the account you&#8217;re testing with.<\/p>\n\n\n\n<p dir=\"ltr\">Yes, I know, it is silly indeed; but it&#8217;s true. The account must have First and Last names, as well as display name properly configured.<\/p>\n\n\n\n<p dir=\"ltr\">HTH some1 <span class=\"smiley \">\ud83d\ude09<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When your application is using keycloak to authenticate to Microsoft Active Directory LDAP service, You may receive the error &#8220;keycloak.models.ModelException: User returned from LDAP has null username!&#8221; in the logs and the login fails. You may want to look at this article (https:\/\/edwin.baculsoft.com\/2019\/10\/fixing-error-null-username-when-integrating-redhat-single-sign-on-to-active-directory) for configuration and initial troubleshooting. There are so many reasons for that, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[18,73,72,74],"class_list":["post-810","post","type-post","status-publish","format-standard","hentry","category-4","tag-active-directory","tag-authentication","tag-keycloak","tag-ldap"],"_links":{"self":[{"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=\/wp\/v2\/posts\/810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=810"}],"version-history":[{"count":7,"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=\/wp\/v2\/posts\/810\/revisions"}],"predecessor-version":[{"id":1124,"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=\/wp\/v2\/posts\/810\/revisions\/1124"}],"wp:attachment":[{"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/as7ablog.com\/kinan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}