MicrosoftAccountHelper Class

Contains static methods that allow to extract user’s information from a Newtonsoft.Json.Linq.JObject instance retrieved from Microsoft after a successful authentication process. http://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/user

Namespace
Microsoft.AspNetCore.Authentication.MicrosoftAccount
Assemblies
  • Microsoft.AspNetCore.Authentication.MicrosoftAccount

Syntax

public class MicrosoftAccountHelper
class Microsoft.AspNetCore.Authentication.MicrosoftAccount.MicrosoftAccountHelper

Methods

GetDisplayName(Newtonsoft.Json.Linq.JObject)

Gets the user’s name.

Return type:System.String
public static string GetDisplayName(JObject user)
GetEmail(Newtonsoft.Json.Linq.JObject)

Gets the user’s email address.

Return type:System.String
public static string GetEmail(JObject user)
GetGivenName(Newtonsoft.Json.Linq.JObject)

Gets the user’s given name.

Return type:System.String
public static string GetGivenName(JObject user)
GetId(Newtonsoft.Json.Linq.JObject)

Gets the Microsoft Account user ID.

Return type:System.String
public static string GetId(JObject user)
GetSurname(Newtonsoft.Json.Linq.JObject)

Gets the user’s surname.

Return type:System.String
public static string GetSurname(JObject user)