给定访问令牌,如何获取Windows Azure Active Directory的域名/名称 [英] Given Access Token, how can I get domain / name of Windows Azure Active Directory

查看:84
本文介绍了给定访问令牌,如何获取Windows Azure Active Directory的域名/名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows Azure管理库,并获取订阅列表和每个订阅的WAAD租户ID(GUID).这意味着我只需要登录WAAD即可权限管理我的订阅.

I am using the Windows Azure Management Libraries and is getting a list of subscriptions and the WAAD tenant id (a guid) for each subscription. This means I just need to sign in to the WAAD to get permision to manage my subscriptions.

我正在开发应用程序,而GUI在UI中并不是那么卑鄙,所以我在寻找一些C#代码,或者只是我可以查询名称的其余调用.

I am developing an application and guids are not that pritty in the UI so I am looking for some C# code or just just the rest call I can query for the name.

我有一个来自Microsoft.IdentityModel.Clients.ActiveDirectory的AuthenticatinoContext的访问令牌

I have a access token from the AuthenticatinoContext of Microsoft.IdentityModel.Clients.ActiveDirectory

推荐答案

DisplayName属性应为您提供所需的内容: http://msdn.microsoft.com/en-us/library/windowsazure/hh974467.aspx

The DisplayName property should give you what you want: http://msdn.microsoft.com/en-us/library/windowsazure/hh974467.aspx

可通过对Graph API的REST调用来使用.有关该图的更多信息,请参见: http://msdn.microsoft.com/en-us/library/windowsazure/hh974476.aspx

This is available via a REST call to the Graph API. For more information on the Graph, see: http://msdn.microsoft.com/en-us/library/windowsazure/hh974476.aspx

这篇关于给定访问令牌,如何获取Windows Azure Active Directory的域名/名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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