OnlineIdAuthenticator.CanSignOut Property
Definition
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.
Indicates whether a user can sign out of the app, and whether to show the sign out link in the 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:
property bool CanSignOut { bool get(); };
bool CanSignOut();
public bool CanSignOut { get; }
var boolean = onlineIdAuthenticator.canSignOut;
Public ReadOnly Property CanSignOut As Boolean
Property Value
bool
True if the user can sign out and the sign out link should be shown in the app, otherwise false.
Examples
var canSignOut = onlineIdAuthenticator.canSignOut;
if (Boolean(canSignOut)){
// Add a "sign out" link to Charm settings.
}
Remarks
An app that uses the OnlineIdAuthenticator class must show an option for the user to sign out. The sign out option must appear in the Settings charm, and the app must create a new page for its user account settings in Accounts. To see an example of how to add the sign out option and the account setting page, see the Windows Account Authorization sample.
If the user has a connected account, they can sign out by visiting the Users page in PC Settings.
If this property is false, a call to SignOutUserAsync fails with the ONL_E_CONNECTED_ACCOUNT_CAN_NOT_SIGNOUT error code.