从Visual Studio Team Services中的别名获取电子邮件和显示名称 [英] Get email and display name from alias in Visual Studio Team Services

查看:112
本文介绍了从Visual Studio Team Services中的别名获取电子邮件和显示名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VSTS中是否有与TFS中的IIdentityManagementService2等效的API?我使用了ReadIdentity( https://msdn.microsoft. com/zh-CN/library/ff731745(v = vs.120).aspx )以获取电子邮件地址和TFS中帐户别名的显示名称.我试图在VSTS中做同样的事情,但是在REST API或Microsoft.VisualStudio.Services.*库中找不到能做类似事情的东西.

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.

推荐答案

是的,您可以通过

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.

您需要注意的一件事是,要调用帐户和个人资料" API,您必须使用

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

问:我可以对配置文件API使用基本身份验证吗?

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

A:不,您必须使用OAuth.

A: No, you must use OAuth.

这篇关于从Visual Studio Team Services中的别名获取电子邮件和显示名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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