Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

App Redirection not working (provider-hosted App)

$
0
0

Following this article: Handle security tokens in provider-hosted low-trust apps for SharePoint 2013 , I use the TokenHelper.GetAppContextTokenRequestUrl() Method to get a redirection URL to another Site on my App.

I call the Method like this (only for testing ofc):

string requestedRedirectionUrl = "https://localhost:43000/MyApp/Manage"; // Page of my MVC App

string redirectionUrl = TokenHelper.GetAppContextTokenRequestUrl(Request["SPHostUrl"], Server.UrlEncode(requestedRedirectionUrl) );

The URL I get is: "https://mysite.sharepoint.com/sites/dev/_layouts/15/AppRedirect.aspx?client_id=7b7a0752-d7ed-4128-b9d6-82c8e4d60ce3&redirect_uri=https%3a%2f%2flocalhost%3a44300%2fMyApp%2fManage"

So my link to the other page looks like:

<a href="https://mysite.sharepoint.com/sites/dev/_layouts/15/AppRedirect.aspx?client_id=7b7a0752-d7ed-4128-b9d6-82c8e4d60ce3&redirect_uri=https%3a%2f%2flocalhost%3a44300%2fMyApp%2fManage">Manage</a>

When clicking this link, I see the SharePoint "Working on it..." and after a few seconds I get to: "https://localhost:43000/MyApp/Manage"BUT without any HTTP Request Parameters or any Query String. So my OAuth authentification fails and I can't use my App as expected.

Why does the AppRedirect.aspx not apply Query String Parameters to my App Page? Am I doing something wrong?



Viewing all articles
Browse latest Browse all 8089

Trending Articles