UserDataAccount UserDataAccount UserDataAccount UserDataAccount Class

Definition

Represents a user data account used to access email, contacts, calendars, and so on.

public : sealed class UserDataAccount : IUserDataAccount, IUserDataAccount2, IUserDataAccount3, IUserDataAccount4public sealed class UserDataAccount : IUserDataAccount, IUserDataAccount2, IUserDataAccount3, IUserDataAccount4Public NotInheritable Class UserDataAccount Implements IUserDataAccount, IUserDataAccount2, IUserDataAccount3, IUserDataAccount4// 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 UserDataAccountStore.GetAccountAsync to get an instance of this class.

Properties

CanShowCreateContactGroup CanShowCreateContactGroup CanShowCreateContactGroup CanShowCreateContactGroup

This API supports the product infrastructure and is not intended to be used directly from your code.

Microsoft Internal Use Only.

public : PlatForm::Boolean CanShowCreateContactGroup { get; set; }public bool CanShowCreateContactGroup { get; set; }Public ReadWrite Property CanShowCreateContactGroup As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A ContactGroup.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

DeviceAccountTypeId DeviceAccountTypeId DeviceAccountTypeId DeviceAccountTypeId

Gets the unique identifier for the type of the account.

public : PlatForm::String DeviceAccountTypeId { get; }public string DeviceAccountTypeId { get; }Public ReadOnly Property DeviceAccountTypeId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The unique identifier for the type of the account such as Exchange, Google, Pop/IMAP and so on.

Remarks

Valid values for this property are:

Account typeID
Exchange Active Sync6833942B-ABDA-4C20-9757-4F9252396BD4
Google via Exchange Active SyncE288529A-1917-4985-897F-34D8121EBFC3
Internet Mail (Pop/IMAP)DC23EAD7-BBF2-44D7-A791-6B2B7580F0C2
Google via IMAP/CardDAV/CalDAV0A95CDAA-C7EB-4133-9793-75E13089F082
iCloud via IMAP/CardDAV/CalDAV45157403-77C9-4E68-9485-6DD9A79D534A

Other values may be added in the future, so you should have a default case to handle unknown values.

DisplayName DisplayName DisplayName DisplayName

Gets or sets the human readable display name for the user data account.

public : PlatForm::String DisplayName { get; set; }public string DisplayName { get; set; }Public ReadWrite Property DisplayName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The human readable display name for the user data account.

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

EnterpriseId EnterpriseId EnterpriseId EnterpriseId

Gets the enterprise identity associated with the user account.

public : PlatForm::String EnterpriseId { get; }public string EnterpriseId { get; }Public ReadOnly Property EnterpriseId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The enterprise identity associated with the user account.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

The EnterpriseId is often a corporate email address and is used when encrypting or decrypting corporate data.

Important

If the EnterpriseId is null or empty then the account is not enterprise protected.

ExplictReadAccessPackageFamilyNames ExplictReadAccessPackageFamilyNames ExplictReadAccessPackageFamilyNames ExplictReadAccessPackageFamilyNames

Gets a list of package family names for apps that have explicit read access even if they don't have the system capability.

public : IVector<string> ExplictReadAccessPackageFamilyNames { get; }public IList<string> ExplictReadAccessPackageFamilyNames { get; }Public ReadOnly Property ExplictReadAccessPackageFamilyNames As IList<string>// You can use this property in JavaScript.
Value
IVector<PlatForm::String> IList<string> IList<string> IList<string>

A list of package family names for apps that have explicit read access even if they don't have the system capability.

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

Icon Icon Icon Icon

Gets the icon associated with the UserDataAccount.

public : IRandomAccessStreamReference Icon { get; set; }public IRandomAccessStreamReference Icon { get; set; }Public ReadWrite Property Icon As IRandomAccessStreamReference// You can use this property in JavaScript.

Remarks

This property is only valid for device user data accounts. It will return null for app user data accounts.

Id Id Id Id

Gets a string that uniquely identifies the UserDataAccount on the local device.

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

A string that uniquely identifies the UserDataAccount on the local device.

IsProtectedUnderLock IsProtectedUnderLock IsProtectedUnderLock IsProtectedUnderLock

Gets a Boolean value indicating if the user account data is encrypted when the device becomes locked.

public : PlatForm::Boolean IsProtectedUnderLock { get; set; }public bool IsProtectedUnderLock { get; set; }Public ReadWrite Property IsProtectedUnderLock As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the user account data is encrypted when the device becomes locked.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

Encrypted data will return as empty value sets during a locked state.

OtherAppReadAccess OtherAppReadAccess OtherAppReadAccess OtherAppReadAccess

Gets or sets a value indicating whether other apps on the device have read access to the UserDataAccount.

public : UserDataAccountOtherAppReadAccess OtherAppReadAccess { get; set; }public UserDataAccountOtherAppReadAccess OtherAppReadAccess { get; set; }Public ReadWrite Property OtherAppReadAccess As UserDataAccountOtherAppReadAccess// You can use this property in JavaScript.

PackageFamilyName PackageFamilyName PackageFamilyName PackageFamilyName

Gets the unique identifier for the app package that created the UserDataAccount.

public : PlatForm::String PackageFamilyName { get; }public string PackageFamilyName { get; }Public ReadOnly Property PackageFamilyName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The unique identifier for the app package that created the UserDataAccount.

Remarks

This value will be null for device user data accounts.

ProviderProperties ProviderProperties ProviderProperties ProviderProperties

Provides a place to store data to be used by the app when interacting with a UserDataAccount provider.

public : IPropertySet ProviderProperties { get; }public IPropertySet ProviderProperties { get; }Public ReadOnly Property ProviderProperties As IPropertySet// You can use this property in JavaScript.
Value
IPropertySet IPropertySet IPropertySet IPropertySet

Data to be used by the app when interacting with a UserDataAccount provider.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

UserDisplayName UserDisplayName UserDisplayName UserDisplayName

Gets or sets a user name associated with the UserDataAccount that is suitable for displaying.

public : PlatForm::String UserDisplayName { get; set; }public string UserDisplayName { get; set; }Public ReadWrite Property UserDisplayName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

A user name associated with the UserDataAccount that is suitable for displaying.

Methods

DeleteAsync() DeleteAsync() DeleteAsync() DeleteAsync()

Asynchronously deletes all the contact, calendar and email data associated with the account.

public : IAsyncAction DeleteAsync()public IAsyncAction DeleteAsync()Public Function DeleteAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

An async action indicating success or failure.

FindAppointmentCalendarsAsync() FindAppointmentCalendarsAsync() FindAppointmentCalendarsAsync() FindAppointmentCalendarsAsync()

Returns a collection of AppointmentCalendar instances associated with the UserDataAccount.

public : IAsyncOperation<IVectorView<AppointmentCalendar>> FindAppointmentCalendarsAsync()public IAsyncOperation<IReadOnlyList<AppointmentCalendar>> FindAppointmentCalendarsAsync()Public Function FindAppointmentCalendarsAsync() As IAsyncOperation( Of IReadOnlyListAppointmentCalendar )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<AppointmentCalendar>> IAsyncOperation<IReadOnlyList<AppointmentCalendar>> IAsyncOperation<IReadOnlyList<AppointmentCalendar>> IAsyncOperation<IReadOnlyList<AppointmentCalendar>>

A collection of AppointmentCalendar instances associated with the UserDataAccount.

FindContactAnnotationListsAsync() FindContactAnnotationListsAsync() FindContactAnnotationListsAsync() FindContactAnnotationListsAsync()

Returns a collection of ContactAnnotationList instances associated with the UserDataAccount.

public : IAsyncOperation<IVectorView<ContactAnnotationList>> FindContactAnnotationListsAsync()public IAsyncOperation<IReadOnlyList<ContactAnnotationList>> FindContactAnnotationListsAsync()Public Function FindContactAnnotationListsAsync() As IAsyncOperation( Of IReadOnlyListContactAnnotationList )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<ContactAnnotationList>> IAsyncOperation<IReadOnlyList<ContactAnnotationList>> IAsyncOperation<IReadOnlyList<ContactAnnotationList>> IAsyncOperation<IReadOnlyList<ContactAnnotationList>>

A collection of ContactAnnotationList instances associated with the UserDataAccount.

FindContactGroupsAsync() FindContactGroupsAsync() FindContactGroupsAsync() FindContactGroupsAsync()

This API supports the product infrastructure and is not intended to be used directly from your code.

Microsoft Internal Use Only.

public : IAsyncOperation<IVectorView<ContactGroup>> FindContactGroupsAsync()public IAsyncOperation<IReadOnlyList<ContactGroup>> FindContactGroupsAsync()Public Function FindContactGroupsAsync() As IAsyncOperation( Of IReadOnlyListContactGroup )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<ContactGroup>> IAsyncOperation<IReadOnlyList<ContactGroup>> IAsyncOperation<IReadOnlyList<ContactGroup>> IAsyncOperation<IReadOnlyList<ContactGroup>>

A collection of ContactGroup instances.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

FindContactListsAsync() FindContactListsAsync() FindContactListsAsync() FindContactListsAsync()

Returns a collection of ContactList instances associated with the UserDataAccount.

public : IAsyncOperation<IVectorView<ContactList>> FindContactListsAsync()public IAsyncOperation<IReadOnlyList<ContactList>> FindContactListsAsync()Public Function FindContactListsAsync() As IAsyncOperation( Of IReadOnlyListContactList )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>>

A collection of ContactList instances associated with the UserDataAccount.

FindEmailMailboxesAsync() FindEmailMailboxesAsync() FindEmailMailboxesAsync() FindEmailMailboxesAsync()

Returns a collection of EmailMailbox instances associated with the UserDataAccount.

public : IAsyncOperation<IVectorView<EmailMailbox>> FindEmailMailboxesAsync()public IAsyncOperation<IReadOnlyList<EmailMailbox>> FindEmailMailboxesAsync()Public Function FindEmailMailboxesAsync() As IAsyncOperation( Of IReadOnlyListEmailMailbox )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<EmailMailbox>> IAsyncOperation<IReadOnlyList<EmailMailbox>> IAsyncOperation<IReadOnlyList<EmailMailbox>> IAsyncOperation<IReadOnlyList<EmailMailbox>>

A collection of EmailMailbox instances associated with the UserDataAccount.

FindUserDataTaskListsAsync() FindUserDataTaskListsAsync() FindUserDataTaskListsAsync() FindUserDataTaskListsAsync()

Returns a collection of UserDataTask instances associated with the UserDataAccount.

public : IAsyncOperation<IVectorView<UserDataTaskList>> FindUserDataTaskListsAsync()public IAsyncOperation<IReadOnlyList<UserDataTaskList>> FindUserDataTaskListsAsync()Public Function FindUserDataTaskListsAsync() As IAsyncOperation( Of IReadOnlyListUserDataTaskList )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<UserDataTaskList>> IAsyncOperation<IReadOnlyList<UserDataTaskList>> IAsyncOperation<IReadOnlyList<UserDataTaskList>> IAsyncOperation<IReadOnlyList<UserDataTaskList>>

A collection of UserDataTask instances associated with the UserDataAccount.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SaveAsync() SaveAsync() SaveAsync() SaveAsync()

Asynchronously persists the UserDataAccount to the database.

public : IAsyncAction SaveAsync()public IAsyncAction SaveAsync()Public Function SaveAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Async action that indicates completion of the save operation.

TryShowCreateContactGroupAsync() TryShowCreateContactGroupAsync() TryShowCreateContactGroupAsync() TryShowCreateContactGroupAsync()

This API supports the product infrastructure and is not intended to be used directly from your code.

Microsoft Internal Use Only.

public : IAsyncOperation<PlatForm::String> TryShowCreateContactGroupAsync()public IAsyncOperation<string> TryShowCreateContactGroupAsync()Public Function TryShowCreateContactGroupAsync() As IAsyncOperation( Of string )// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)