1

I have a simple Windows Forms Application to try Live Connect and Azure Mobile Services. Not a Windows 8 Modern App.

I'm trying to make use of some sample code for Live Connect and have been able to get the sign-in part to work fine. In the end I get an access_token after signing in.

On the Mobile Services side in the same Windows Forms Application, I'm trying to use REST to login. However, I seeem to get an "401 Unauthorized" response because "The authentication token's signature was malformed or signed by a different key"

JWT seem to have two '.' in the token. SWT seem to have '/', '+' and '='

Is there a conversion that I need to do?

Is there a way to configure Live Connect so that the authentication token returned is JWT (or whatever Mobile Services expects)?

I've check the client secret on both Live Connect and Mobile Services, and they are correct.

Carlo Mendoza
  • 765
  • 6
  • 24
  • Have you looked at the sample provided in http://msdn.microsoft.com/en-us/library/windowsazure/jj710106.aspx ? It shows how to do a POST using the token provided by Live Connect. – Oppositional Feb 21 '13 at 06:36
  • That is the sample I'm using for the Mobile Services portion of the code (with the secrets/X-ZUMO-APPLICATION changed of course). Researching this a little bit more last night, I discovered I probably wasn't using the right token (access_token vs authentication_token). Now my problem is, I can't seem to get Live Connect to give me an authentication_token. – Carlo Mendoza Feb 21 '13 at 15:54
  • 1
    To get the authentication token using Live Connect, you need to both set the redirect URI on the live application, and also pass the redirect uri in the constructor to the live connect class. – carlosfigueira Feb 21 '13 at 17:14
  • I don't have a redirect URI for my desktop application. This is the bit that is a little confusing. Why do I need one? – Carlo Mendoza Feb 21 '13 at 17:28

1 Answers1

2

As pointed out by @carlosfigueira, in the Live Connect Developer Center, your app needs to have something in the redirect domain field. It can be a dummy URI.

Corroberated by an answer here: http://social.msdn.microsoft.com/Forums/en-US/messengerconnect/thread/4a110db0-6468-44fb-9152-771987ded050

Carlo Mendoza
  • 765
  • 6
  • 24