Robert Oschler
Robert Oschler

Reputation: 14375

"Authentication Failed" with Live Connect SDK on Windows Phone 8 app?

I'm following along with this OneNote API tutorial that uses the Live Connect SDK for Windows Phone 8 to authenticate the user:

http://msdn.microsoft.com/en-us/library/office/dn575424.aspx

I have a proper Client ID and I added it to the MainPage.xml file as indicated. However, when I run the sample app on the Emulator or my Windows Phone 8 device, I got "authentication failed" in the OnSessionChanged() handler.

What I find a little confusing is that it never asks me to provide any Windows Live login credentials. What am I doing wrong and how to do I get this to work?

TANGENTIAL: I have the WinRT Live SDK single-sign on working fine in a Windows Store App. Now that's WinRT and not Windows Phone 8, but if it sheds any light on whether or not my Live login credentials are valid, I'm including this anecdotal evidence here.

Upvotes: 3

Views: 580

Answers (1)

GarethJ
GarethJ

Reputation: 6606

A likely cause is sharing a ClientId between a Windows Store app and a Windows Phone app. Right now, these need to be separate ClientIds, as they need a setting flipped in opposite directions for each platform.

On the dev portal at https://account.live.com/developers/applications make sure that the "Mobile or desktop client app" is set to "yes" under "API Settings" for the WinPhone one.

Upvotes: 4

Related Questions