WebAccount WebAccount WebAccount WebAccount Class

Identifies an account from a web account provider.

Syntax

Declaration

public sealed class WebAccountpublic sealed class WebAccountPublic NotInheritable Class WebAccountpublic sealed class WebAccount

Constructors summary

Creates an instance of the WebAccount class.

Properties summary

Gets the Id of the web account.

Gets the properties of the web account.

Gets the connected state of the web account.

Gets the username for the web account.

Gets the web authentication provider for the account.

Methods summary

Gets the web account's picture asynchronously.

Signs the web account out asynchronously. This clears all cached tokens associated with the account, and tells the provider to invalidate any tokens associated with the account for this app.

Signs the web account out asynchronously. This clears all cached tokens associated with the account, and tells the provider to invalidate any tokens associated with the account for this app.

Constructors

  • WebAccount(WebAccountProvider, String, WebAccountState)
    WebAccount(WebAccountProvider, String, WebAccountState)
    WebAccount(WebAccountProvider, String, WebAccountState)
    WebAccount(WebAccountProvider, String, WebAccountState)

    Creates an instance of the WebAccount class.

    public WebAccount(WebAccountProvider webAccountProvider, String userName, WebAccountState state)public New(WebAccountProvider webAccountProvider, String userName, WebAccountState state)Public Sub New(webAccountProvider As WebAccountProvider, userName As String, state As WebAccountState)public WebAccount(WebAccountProvider webAccountProvider, String userName, WebAccountState state)

    Parameters

Properties

  • Id
    Id
    Id
    Id

    Gets the Id of the web account.

    public string Id { get; }public string Id { get; }Public ReadOnly Property Id As stringpublic string Id { get; }

    Property Value

    • string
      string
      string
      string

      The Id of the WebAccount.

  • Properties
    Properties
    Properties
    Properties

    Gets the properties of the web account.

    public IMapView<string, string> Properties { get; }public IMapView<string, string> Properties { get; }Public ReadOnly Property Properties As IMapView<string, string>public IMapView<string, string> Properties { get; }

    Property Value

  • State
    State
    State
    State

    Gets the connected state of the web account.

    public WebAccountState State { get; }public WebAccountState State { get; }Public ReadOnly Property State As WebAccountStatepublic WebAccountState State { get; }

    Property Value

  • UserName
    UserName
    UserName
    UserName

    Gets the username for the web account.

    public string UserName { get; }public string UserName { get; }Public ReadOnly Property UserName As stringpublic string UserName { get; }

    Property Value

    • string
      string
      string
      string

      The username for the web account.

  • WebAccountProvider
    WebAccountProvider
    WebAccountProvider
    WebAccountProvider

    Gets the web authentication provider for the account.

    public WebAccountProvider WebAccountProvider { get; }public WebAccountProvider WebAccountProvider { get; }Public ReadOnly Property WebAccountProvider As WebAccountProviderpublic WebAccountProvider WebAccountProvider { get; }

    Property Value

Methods

  • GetPictureAsync(WebAccountPictureSize)
    GetPictureAsync(WebAccountPictureSize)
    GetPictureAsync(WebAccountPictureSize)
    GetPictureAsync(WebAccountPictureSize)

    Gets the web account's picture asynchronously.

    public IAsyncOperation<IRandomAccessStream> GetPictureAsync(WebAccountPictureSize desizedSize)public IAsyncOperation<IRandomAccessStream> GetPictureAsync(WebAccountPictureSize desizedSize)Public Function GetPictureAsync(desizedSize As WebAccountPictureSize) As IAsyncOperation( Of IRandomAccessStream )public IAsyncOperation<IRandomAccessStream> GetPictureAsync(WebAccountPictureSize desizedSize)

    Parameters

    Returns

    • When this method completes, it returns the web account's picture.

  • SignOutAsync()
    SignOutAsync()
    SignOutAsync()
    SignOutAsync()

    Signs the web account out asynchronously. This clears all cached tokens associated with the account, and tells the provider to invalidate any tokens associated with the account for this app.

    public IAsyncAction SignOutAsync()public IAsyncAction SignOutAsync()Public Function SignOutAsync() As IAsyncActionpublic IAsyncAction SignOutAsync()

    Returns

  • SignOutAsync(String)
    SignOutAsync(String)
    SignOutAsync(String)
    SignOutAsync(String)

    Signs the web account out asynchronously. This clears all cached tokens associated with the account, and tells the provider to invalidate any tokens associated with the account for this app.

    public IAsyncAction SignOutAsync(String clientId)public IAsyncAction SignOutAsync(String clientId)Public Function SignOutAsync(clientId As String) As IAsyncActionpublic IAsyncAction SignOutAsync(String clientId)

    Parameters

    • clientId
      System.String
      System.String
      System.String
      System.String

      The Id of the client.

    Returns

    Remarks

    This method is app-specific and applies only to a single device. It will not remove the account from Windows or sign out the account on other devices.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Security.Credentials.dll