24389

Given Access Token, how can I get domain / name of Windows Azure Active Directory

Question:

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.

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.

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

Answer1:

The DisplayName property should give you what you want: <a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh974467.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windowsazure/hh974467.aspx</a>

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

Recommend

  • android Wear 5.0 can't resolve host (Http , AsyncClient ETC. )
  • Visual Studio 2017 hangs while loading a solution
  • MVC Identity 2.2.1 - Primary Key (Guid) as UniqueIdentifier instead of nVarChar(128)
  • Visual Studio Extention - Context Menu for 'Server Explorer'
  • difference between keeping database in app_data and connecting to an external database
  • Any real use for table-per-concrete-class with implicit polymorphism?
  • Play Framework nested form errors missing
  • CUDA Debugging - VS on windows workstation, GPUs on Linux server?
  • Download/Save/Write a file on the client's hard disk using flash/flex
  • CSS: How to fix overlapping divs
  • Facebook Messenger Platform - Detect user typing
  • How to add the custom button on google's(device) native application in android?
  • sweetalert2 inputoptions from file in select example
  • Compare struct to a constant in C
  • Cannot get text from text area
  • Django Haystack Rebuild Index
  • MySQL performance when updating row with FK
  • NHibernate manually control fetching
  • How to 'create temp table as select' in Slick?
  • How to get data from **Realm database** using **date object**?
  • Do query loads all the data in memory
  • Merging rows to columns
  • Zurb Foundation _global.scss meta styles for js?
  • Ajax calls do not work in IE unless you fiddle with security settings
  • jQuery ready not fired after rails link_to is clicked
  • ActiveRecord query for a count of new users by day
  • Can you perform a UNION without a subquery in SQLAlchemy?
  • How to set ini file attributes during an Inno install
  • Bad request using file_get_contents for PUT request in PHP
  • PostgreSQL Query without WHERE only ORDER BY and LIMIT doesn't use index
  • C# - Serializing and deserializing static member
  • Sending data from AppleScript to FileMaker records
  • Display Images one by one with next and previous functionality
  • Matrix multiplication with MKL
  • How to include full .NET prerequisite for Wix Burn installer
  • SQL merge duplicate rows and join values that are different
  • How does Linux kernel interrupt the application?
  • Is it possible to post an object from jquery to bottle.py?
  • Busy indicator not showing up in wpf window [duplicate]
  • Why do underscore prefixed variables exist?