Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why does Jira crop username at 20 characters coming from AD/LDAP?

Stephen Casey February 5, 2018

Hi, any idea if I can prevent Jira from cropping usernames at 20 characters?  I'm doing a sync with AD and it gets other fields in full but it's cutting the end off the usernames.

 

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2018

Hi Stephen,

There is a good knowledge base article that explains what's going on titled Username truncates at 20 characters when using AD:

Problem

Crowd 2.8 with Microsoft Active Directory sync truncates the username to 20 characters.

In Crowd/Jira/Confluence it appears as IncidentTrackingActor

Diagnosis

Environment

  • Crowd 2.8 with Microsoft Active Directory

Cause

The sAMAccountName attribute can store only 20 characters for a backward compatibility with pre-2000 Windows Server logon names. If you’ve mapped the usernames in your database to the sAMAcocuntName attribute, it could be causing your AD to deliver truncated usernames.

There is a workaround in the knowledge base but I have been informed it's going to be updated to make the explanation more clear shortly so please check it in about an hour.  At this time here's how it's worded:

Workaround

In case you have your cn attribute populated for all your Confluence users on AD, you can use it for username, as this attribute can store up to 64 characters.

Hopefully this helps.  Let me know.

Cheers,

Branden

Stephen Casey February 6, 2018

Branden,

Thanks for the link.  The Workaround is clear, easy though slightly worrying to implement.

I'm unsure what impact simply changing sAMAccountName to CN will have in the User Name Attribute field - any idea if there's any risk to existing accounts?  99% of them are under 20 characters, would they even be impacted?  Will it double up on the 1% on a resync?

Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events