Get email and display name from alias in Visual Studio Team Services

时光总嘲笑我的痴心妄想 提交于 2019-12-08 06:36:18

问题


is there any API in VSTS that's equivalent to IIdentityManagementService2 in TFS? I used ReadIdentity(https://msdn.microsoft.com/en-us/library/ff731745(v=vs.120).aspx) to get the email address and display name of an account alias in TFS. I am trying to do the same in VSTS, but I am not finding anything that can do similar things in its REST API or Microsoft.VisualStudio.Services.* libraries.


回答1:


Yes, you can get it via Accounts and profiles in VSTS Rest API, the "Accounts" can get the accounts in the collection and the "Profiles" can get the information like Display Name, Email address for the member.

One thing you need to notice is that, to call "Accounts and profiles" API, you must use OAuth2.0 authentication.

Q: Can I use basic auth with the profiles API?

A: No, you must use OAuth.



来源:https://stackoverflow.com/questions/39155773/get-email-and-display-name-from-alias-in-visual-studio-team-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!