We in our Organisation, use AD groups to control the Access Level.
From TFS 2017 Upgrade, TFS Access Level is not accepting the AD groups with (&) ampersand which used to be allowed till the previous release. We get the error post upgrade and when we tried to add a new group to the Access Level.
TF10158: The user or group name XXXXXXXX contains unsupported characters, is empty, or too long.
Added a solution by Peaky Yuter · 4 days ago
We have already tried example strings like the one that you showed, but were unable to reproduce the error you're describing. To continue to debug this, we need your exact group name and the TFS complete version number. Thank you so much again!
Cannot add TFS server group to Access Level
Unable to add a gMSA to any Security Group
Can't use Global release variable in RM
Build Agent Crashes