Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UserIdentity class

Contains the ID, tickets, and other information associated with a user.

Syntax


public ref class UserIdentity sealed 

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The UserIdentity class has these types of members:

Methods

The UserIdentity class inherits methods from the Object class (C#/VB/C++).

Properties

The UserIdentity class has these properties.

PropertyAccess typeDescription

FirstName

Read-onlyContains the first name of the user. This value is available only to Microsoft application partners.

Id

Read-onlyGets the user's unique Microsoft account identifier. This value is available only to Microsoft application partners.

IsBetaAccount

Read-onlyIndicates if the user is part of a beta program. This value is available only to Microsoft application partners.

IsConfirmedPC

Read-onlyIndicates if the user is on a PC that they have confirmed as their PC. This value is available only to Microsoft application partners.

LastName

Read-onlyContains the user's last name. This value is available only to Microsoft application partners.

SafeCustomerId

Read-onlyGets an obfuscated customer ID specific to the calling application.

SignInName

Read-onlyThe sign in name of the user. This value is available only to Microsoft application partners.

Tickets

Read-onlyContains an array of tickets that identify the user

 

Examples


List<OnlineIdServiceTicketRequest> targetArray = new List<OnlineIdServiceTicketRequest>();
targetArray.Add(new OnlineIdServiceTicketRequest("wl.basic wl.contacts_photos wl.calendars",
        "DELEGATION"));

DebugPrint("Signing in ...");

Windows.Security.Authentication.OnlineId.UserIdentity result = 
        await _authenticator.AuthenticateUserAsync(targetArray, CredentialPromptType.PromptIfNeeded);

if (result.Tickets[0].Value != string.Empty)
{
    DebugPrint("Signed in.");
    IsNotSignedIn = false;
}
else
{
    // Handle errors like bad parameter, misconfigured target, and so on.
    DebugPrint("Unable to get the ticket. Error: " + result.Tickets[0].ErrorCode.ToString());
    IsNotSignedIn = true;
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Security.Authentication.OnlineId
Windows::Security::Authentication::OnlineId [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft