-api-id | -api-type |
---|---|
T:Windows.Security.Authentication.OnlineId.SignOutUserOperation |
winrt class |
Allows users to sign out of 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.
This example shows how to sign out of an app.
function signOut() {
if (sdkSample.canSignOut) {
sdkSample.displayStatus("Signing out...");
authenticator.signOutUserAsync().done(function () {
sdkSample.accessToken = null;
sdkSample.authenticatedSafeCustomerId = "";
sdkSample.isSignedIn = false;
sdkSample.displayStatus("Signed out.");
},
function (status) {
if (status && (status.name !== "Canceled")) {
showErrorMessage("Sign out action failed: " + status.message);
} else {
sdkSample.displayStatus("");
}
});
}
}