OnlineIdAuthenticator.AuthenticatedSafeCustomerId | authenticatedSafeCustomerId property

Returns the ID of a user who has been successfully authenticated for your app.

Syntax


var authenticatedSafeCustomerId = onlineIdAuthenticator.authenticatedSafeCustomerId;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The ID of a user who has been successfully authenticated for your app.

Remarks

This property returns the same user ID as the UserIdentity.SafeCustomerId property.

If the user was not successfully authenticated for your app, this property value is empty.

If your app stores local data based on the user’s identity, you must check the authenticatedSafeCustomerId property to ensure there were no changes since the last authentication for your app. Check this property when your app is launched or activated, before getting the user identity and associated tickets.

Examples


var authenticatedSafeCustomerId = onlineIdAuthenticator.authenticatedSafeCustomerId;
if (authenticatedSafeCustomerId !== "")
{
    // use
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

OnlineIdAuthenticator

 

 

Show:
© 2014 Microsoft