3
votes

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.

1
Not really seen this problem, but is it possible you're trying to share a ClientId between Windows Store/Windows Phone app? You need a second client Id right now. On the dev portal at 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.GarethJ
@GarethJ That was it. Ginny Caughey on Twitter just told me that a few minutes ago. If you want to create a reply I'll mark it as the answer.Robert Oschler

1 Answers

4
votes

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.