UserDataAccountManager UserDataAccountManager UserDataAccountManager UserDataAccountManager Class

Definition

Provides APIs to interact with the user’s data accounts including those implemented by the operating system.

public : static class UserDataAccountManagerpublic static class UserDataAccountManagerPublic Static Class UserDataAccountManager// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Call static methods to display UI so that the user can perform tasks including adding and deleting accounts.

Methods

GetForUser(User) GetForUser(User) GetForUser(User) GetForUser(User)

Gets the UserDataAccountManagerForUser object for the specified user.

public : static UserDataAccountManagerForUser GetForUser(User user)public static UserDataAccountManagerForUser GetForUser(User user)Public Static Function GetForUser(user As User) As UserDataAccountManagerForUser// You can use this method in JavaScript.
Parameters
user
User User User User

The user account to use to get the UserDataAccountManagerForUser object.

Returns

Returns the data account manager for the account specified by the user parameter.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

RequestStoreAsync(UserDataAccountStoreAccessType) RequestStoreAsync(UserDataAccountStoreAccessType) RequestStoreAsync(UserDataAccountStoreAccessType) RequestStoreAsync(UserDataAccountStoreAccessType)

Asynchronously returns the UserDataAccountStore from the system.

public : static IAsyncOperation<UserDataAccountStore> RequestStoreAsync(UserDataAccountStoreAccessType storeAccessType)public static IAsyncOperation<UserDataAccountStore> RequestStoreAsync(UserDataAccountStoreAccessType storeAccessType)Public Static Function RequestStoreAsync(storeAccessType As UserDataAccountStoreAccessType) As IAsyncOperation( Of UserDataAccountStore )// You can use this method in JavaScript.
Parameters
storeAccessType
UserDataAccountStoreAccessType UserDataAccountStoreAccessType UserDataAccountStoreAccessType UserDataAccountStoreAccessType

Specifies the access type, such as read-only for all accounts or read/write for the calling app's accounts.

Returns

Remarks

In order to gain access to the UserDataAccountStore, your app must declare at least one of the following capabilities:

  • contacts
  • appointments
  • email If none of these capabilities are declared, RequestStoreAsync will throw an AccessDeniedException.

If RequestStoreAsync returns null it means that the user has turned off access in their privacy settings.

ShowAccountErrorResolverAsync(String) ShowAccountErrorResolverAsync(String) ShowAccountErrorResolverAsync(String) ShowAccountErrorResolverAsync(String)

This method shows the resolve message for an account error.

public : static IAsyncAction ShowAccountErrorResolverAsync(PlatForm::String id)public static IAsyncAction ShowAccountErrorResolverAsync(String id)Public Static Function ShowAccountErrorResolverAsync(id As String) As IAsyncAction// You can use this method in JavaScript.
Parameters
id
PlatForm::String String String String

The user data account ID.

Returns

An async action indicating success or failure.

ShowAccountSettingsAsync(String) ShowAccountSettingsAsync(String) ShowAccountSettingsAsync(String) ShowAccountSettingsAsync(String)

This method shows the account settings.

public : static IAsyncAction ShowAccountSettingsAsync(PlatForm::String id)public static IAsyncAction ShowAccountSettingsAsync(String id)Public Static Function ShowAccountSettingsAsync(id As String) As IAsyncAction// You can use this method in JavaScript.
Parameters
id
PlatForm::String String String String

The user data account ID.

Returns

An async action indicating success or failure.

ShowAddAccountAsync(UserDataAccountContentKinds) ShowAddAccountAsync(UserDataAccountContentKinds) ShowAddAccountAsync(UserDataAccountContentKinds) ShowAddAccountAsync(UserDataAccountContentKinds)

Shows the add account UI.

public : static IAsyncOperation<PlatForm::String> ShowAddAccountAsync(UserDataAccountContentKinds contentKinds)public static IAsyncOperation<string> ShowAddAccountAsync(UserDataAccountContentKinds contentKinds)Public Static Function ShowAddAccountAsync(contentKinds As UserDataAccountContentKinds) As IAsyncOperation( Of string )// You can use this method in JavaScript.
Parameters
Returns

Returns the newly added or already existing account.