Question

I'm experimenting with Windows Phone apps and live connect. I have this control on my main page:

xmlns:live="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"

...

<live:SignInButton ClientId="[my client id, which I registered earlier today]"
                   Scopes="wl.signin wl.basic"
                   Branding="Skydrive"
                   TextType="SignIn"
                   SessionChanged="SignInButton_SessionChanged" />

Here is the handler for SessionChanged:

private async void SignInButton_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
{
    if (e.Error != null)
        System.Diagnostics.Debugger.Break();

    ...
}

I debug my app using the Windows Phone emulator. When I click the Sign In button, I get this exception:

The provided value for the input parameter 'redirect_uri' is not valid. The client application must be marked as 'mobile' or the value must be an absolute URL which matches the registered redirect URI.

I do not explicitly specify a redirect_uri anywhere. Why does Sign In fail due to an invalid redirect_uri?

Was it helpful?

Solution

You must explicity mark your app as 'mobile' in the Windows Store Dev Center.

  1. Open https://account.live.com/developers/applications/ in your browser.
  2. Select your app from "My Applications"
  3. Click the "Edit Settings" link
  4. Click the "API Settings" link.
  5. Set "Mobile or Desktop Client App" to "Yes".

API Settings page screenshot

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top