在TFS2018工作项“分配给"字段中找不到一些现有用户.即使将它们添加到团队项目中 [英] some existing users cant be found in TFS2018 workitem 'assigned to' field. even they are added to team project

查看:82
本文介绍了在TFS2018工作项“分配给"字段中找不到一些现有用户.即使将它们添加到团队项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户正在使用TFS2018 update2版本. AD用于管理TFS用户. 现在大约有1000个用户.大约有10到20个用户报告在TFS工作项分配给"字段中找不到他们的用户帐户.如此奇怪和困惑!

My customer are using TFS2018 update2 version. and AD is used to manager TFS user. there are about 1000 users right now. and about 10 to 20 users reported that their user account can't be found in TFS workitem "Assigned to" field. so strange and confused!

1)我们确实检查了workitem设置的'AssignedTo'字段,它是默认设置,它允许现有用户和有效用户使用. 2)用户甚至被添加到团队项目中,但是,在分配给"字段中使用搜索时找不到他们.

1) we did check the 'AssignedTo' field of the workitem setting, is is of default setting, which allows existing user and valid users. 2) the users are even added to the team project, however, they can't be found when using search in 'assigned to 'field.

3)尝试了其他类型的工作项,任何项目.同样的问题.

3) tried other type of workitems, any projects. same issues.

通常来说,可以将这样的用户成功添加到团队项目中,而在所有项目的所有工作项的分配给"文件中都找不到这些用户.因此我们怀疑这是某种用户帐户同步问题?

Generally speaking, such users can be added to team project successfully.and they can't be found in 'assigned to' filed of all workitems in all projects. so we doubt it is some kind of user account sync issues?

,我们做了更多的调查和调试.并且我们找到了一个名为 operationScopes 的参数,其值为' ims ';如果我们向该数组添加值' ad '.可以找到用户!并且我们注意到,这些不良用户"和良好用户"之间的返回值b差异位于本地目录"和"localId" 字段中.这里的值是null,对于好用户来说,本地目录 LocalID 都不为空. 希望这个线索有用. http://TFS2018server:8080/tfs/TFSCollection/_apis/IdentityPicker/Identities

and we did do more investigation and debugging. and we found a para named operationScopes,and its value is 'ims';and if we add value 'ad' to this array. the users can be found! and we noticed the returned value bdifference between such 'bad users' and 'good users' are of the 'Local directory'and 'localId' field. the value is null here, for good user, neither local directory nor LocalID is null. hope this clue works. http://TFS2018server:8080/tfs/TFSCollection/_apis/IdentityPicker/Identities

并添加更多线索,我们更新了Web Services_static \ tfs \ Dev16.M122.5_script \ TFS \ debug \ VSS \ Identities \ Picker \ Services.js ;通过在OperationScope.IMS开关中添加queryScopes.push("ims"),可以找到用户.而且我知道,这不是更新TFS代码的好方法,而只是进行调试.希望它是有用的.

and add more clues, we updated the Web Services_static\tfs\Dev16.M122.5_script\TFS\debug\VSS\Identities\Picker\Services.js; by adding queryScopes.push("ims") in the OperationScope.IMS switch, then the users can be found. and I know, it is not a good way to update TFS code, it is just to do debugging. hope it is useful.

推荐答案

我在Azure DevOps Server 2019(版本Dev17.M153.3)中存在相同的问题 当我尝试将用户添加到安全组时,它显示了该用户,但无法检索scopeName,因此,如果其他域中的其他用户使用相同的用户名,则会引发以下错误

I have the same issue in Azure DevOps Server 2019 (Version Dev17.M153.3) when I tried to add a user to a security group it shows the user but it cannot retrieve the scopeName such that if there is any other user in other domains with the same username it raises the following error

找到多个与"theusername"匹配的身份.使用唯一的名称 指定以下身份之一:

Multiple identities found matching 'theusername'. Use the unique name to specify one of the following identities:

  • 全名1(唯一名称:domain1 \ theusername)
  • 全名2(唯一名称:domain2 \ theusername)

,但其他集合中的同一用户正在工作.

but the same user in other collection is working.

queryScopes.push("ims")已经在那里.

in C:\Program Files\Azure DevOps Server 2019\Application Tier\Web Services_static\tfs\Dev17.M153.3_scripts\TFS\debug\VSS\Identities\Picker\Services.js queryScopes.push("ims") was already there.

经过一番调查,我可以将问题简化为以下Powershell代码

after some investigation i could reduce the problem to the following powershell code

$url1 = "https://tfsserver/CB/_apis/IdentityPicker/Identities?api-version=5.1-preview.1"
$Body = '{"query":"mydomainname\\myusername","identityTypes":["user","group"],"operationScopes":["ims","ad","wmd"],"properties":["DisplayName","IsMru","ScopeName","SamAccountName","Active","SubjectDescriptor","Department","JobTitle","Mail","MailNickname","PhysicalDeliveryOfficeName","SignInAddress","Surname","Guest","TelephoneNumber","Description"],"filterByAncestorEntityIds":[],"filterByEntityIds":[],"options":{"MinResults":40,"MaxResults":40,"ExtensionId":"F12CA7AD-00EE-424F-B6D7-9123A60F424F","ProjectScopeName":"ateamprojectname","CollectionScopeName":"badcollection","Constraints":[]}}'
$x= Invoke-Webrequest $url1 -Method POST -ContentType application/json -UseDefaultCredentials -Body $Body
$y = $x.Content | ConvertFrom-Json
Write-Host "badcollection->", $y.results.identities.scopeName

$url1 = "https://tfsserver/CB_TestCollection/_apis/IdentityPicker/Identities?api-version=5.1-preview.1"
$Body = '{"query":"mydomainname\\myusername","identityTypes":["user","group"],"operationScopes":["ims","ad","wmd"],"properties":["DisplayName","IsMru","ScopeName","SamAccountName","Active","SubjectDescriptor","Department","JobTitle","Mail","MailNickname","PhysicalDeliveryOfficeName","SignInAddress","Surname","Guest","TelephoneNumber","Description"],"filterByAncestorEntityIds":[],"filterByEntityIds":[],"options":{"MinResults":40,"MaxResults":40,"ExtensionId":"F12CA7AD-00EE-424F-B6D7-9123A60F424F","ProjectScopeName":"ateamprojectname","CollectionScopeName":"goodCollection","Constraints":[]}}'
$x= Invoke-Webrequest $url1 -Method POST -ContentType application/json -UseDefaultCredentials -Body $Body
$y = $x.Content | ConvertFrom-Json
Write-Host "goodcollection->", $y.results.identities.scopeName

第一个写主机的输出结果是"badcollection->" 但是第二个写入主机的输出结果是"goodcollection-> mydomainname"

the output result for the first write-host is "badcollection->" but the output result for the second write-host is "goodcollection->mydomainname"

问题是: 为什么要依赖收藏? 我该如何强制tfs同步该用户帐户的不良收集和不良收集.

the questions are: Why does it depend on collection? How can i force tfs to sychronize that user account for the badcollection as well as the good collection.

这篇关于在TFS2018工作项“分配给"字段中找不到一些现有用户.即使将它们添加到团队项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆