On windows 2016 in AD setup when I try to use SSPI with postgresql 11 and following settings :


host    all all    sspi    map=newmap #IP4


newmap  SrvSupportPsgr  srvsupportpsgr


Log: no match in usermap "newmap" for user "SrvSupportPsgr" authenticated as "SrvSupportPsgr@domainname"

FATAL: SSPI authentication failed for user "SrvSupportPsgr"

this account has superuser on postgres and local admin + domain user on AD. I have tried putting usernames in double quotes as well. thanks

1 Answer 1


If you are authenticated as "SrvSupportPsgr@domainname", then that is what needs to be in the 2nd column of pg_ident.conf; including the "@domainname" part. (Or it could be a regexp which matches to that)

Also, pg_ident.conf is case sensitive. In the third column, "SrvSupportPsgr" is not the same thing as "srvsupportpsgr".

  • thanks for the answer. I tried with domainname part added but didn't work. DB username is all lower case.
    – CAM
    Jul 22, 2019 at 8:15
  • The error message is showing the attempted username as mixed case.
    – jjanes
    Jul 22, 2019 at 10:59
  • but isn't it suppose to map it to lowercase provided. thanks
    – CAM
    Jul 22, 2019 at 12:41
  • Mapping to lower case for unquoted SQL identifiers is done inside the database. You are not inside the database until after the connection is established, you are outside of it. (And if it did map to lower case, I think the error message would have reflected that.)
    – jjanes
    Jul 22, 2019 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.