Muhammad Saifullah
Muhammad Saifullah

Reputation: 4292

Access Denied exception when calling Windows Phone 8.1 ContactManager.RequestStoreAsync();

Using following tutorial from MSDN i am trying to retrieve contacts. But getting Access denied exception. Quickstart: Selecting user contacts Windows Phone Store app

PS: I am using windows phone 8.1 universal app.

I am getting exception at following line

 ContactStore contactStore = await ContactManager.RequestStoreAsync();

and below is the exception stack trace

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at App3.Members.d__0.MoveNext()

Upvotes: 2

Views: 2016

Answers (1)

lisp
lisp

Reputation: 4198

Check the Requirements section in the documentation of ContactStore class documentation of ContactStore class.

Edit WMAppManifest.xaml and add ID_CAP_CONTACTS capability.

Upvotes: 5

Related Questions