AuthenticatedSafeCustomerId | authenticatedSafeCustomerId property

OnlineIdAuthenticator.AuthenticatedSafeCustomerId | authenticatedSafeCustomerId property

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

Note  If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
 

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 (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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:
© 2016 Microsoft