Share via


OnlineIdAuthenticator.AuthenticatedSafeCustomerId プロパティ

定義

アプリに対して正常に認証されたユーザーの ID を返します。

注意

Windows 10以上の開発を行う場合は、代わりに Windows.Security.Authentication.Web.Core API を使用してください。 詳細については、「 Web アカウント マネージャー」を参照してください。

public:
 property Platform::String ^ AuthenticatedSafeCustomerId { Platform::String ^ get(); };
winrt::hstring AuthenticatedSafeCustomerId();
public string AuthenticatedSafeCustomerId { get; }
var string = onlineIdAuthenticator.authenticatedSafeCustomerId;
Public ReadOnly Property AuthenticatedSafeCustomerId As String

プロパティ値

String

Platform::String

winrt::hstring

アプリに対して正常に認証されたユーザーの ID。

string authenticatedSafeCustomerId = onlineIdAuthenticator.authenticatedSafeCustomerId;
if (authenticatedSafeCustomerId != string.Empty)
{
    // use
}

注釈

このプロパティは、 UserIdentity.SafeCustomerId プロパティと同じユーザー ID を返します。

ユーザーがアプリに対して正常に認証されなかった場合、このプロパティ値は空です。

アプリがユーザーの ID に基づいてローカル データを格納する場合は、認証されたSafeCustomerId プロパティをチェックして、アプリの最後の認証以降に変更がないことを確認する必要があります。 ユーザー ID と関連チケットを取得する前に、アプリの起動時またはアクティブ化時にこのプロパティを確認します。

適用対象