SignOutUserOperation Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class SignOutUserOperation sealed : IAsyncAction
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SignOutUserOperation final : IAsyncAction
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SignOutUserOperation : IAsyncAction
Public NotInheritable Class SignOutUserOperation
Implements IAsyncAction
- Inheritance
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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("");
}
});
}
}
Completed |
Gets or sets a handler that is called when the operation completes. 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. |
Error |
Gets the error code should the operation fail. 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. |
Id |
Gets a unique identifier that represents the operation. 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. |
Status |
Gets the current status of the operation. 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. |
Cancel() |
Requests the cancellation of the operation. 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. |
Close() |
Requests that work associated with the operation should terminate. 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. |
Get |
Returns the results of the operation. For this class, there are no results to return if the operation succeeds. 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. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |