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
| 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.
The user account to use to get the UserDataAccountManagerForUser object.
Returns the data account manager for the account specified by the user parameter.
| 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.
- 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 the UserDataAccountStore.
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.
- id
- PlatForm::String String String String
The user data account ID.
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.
- id
- PlatForm::String String String String
The user data account ID.
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.
- contentKinds
- UserDataAccountContentKinds UserDataAccountContentKinds UserDataAccountContentKinds UserDataAccountContentKinds
The type of user data content.
Returns the newly added or already existing account.