This topic has not yet been rated - Rate this topic

SignOutUserOperation class

Allows users to sign out of your app.

Syntax


public sealed class SignOutUserOperation : IAsyncAction,
    IAsyncInfo

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The SignOutUserOperation class has these types of members:

Methods

The SignOutUserOperation class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Cancel Requests the cancellation of the operation.
Close Requests that work associated with the operation should terminate.
GetResults Returns the results of the operation. For this class, there are no results to return if the operation succeeds.

 

Properties

The SignOutUserOperation class has these properties.

PropertyAccess typeDescription

Completed

Read/writeGets or sets a handler that is called when the operation completes.

ErrorCode

Read-onlyGets the error code should the operation fail.

Id

Read-onlyGets a unique identifier that represents the operation.

Status

Read-onlyGets the current status of the operation.

 

Remarks

Windows Phone 8

This API is not implemented and will throw an exception if called. See Windows Phone Runtime API.

Examples

This examples 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("");
            }
        });
    }
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8 [not implemented, see Remarks]

Namespace

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

Metadata

Windows.winmd

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.