how do I retrieve the ClientID of the autohosted remote web app from app web?


i trying construct url using javascript within page of application web. link redirect remote web , must include clientid of autohosted web application. how client_id app web?

url = hostweburl + "/_layouts/15/appredirect.aspx?client_id=" + clientid + "&redirect_uri=" + encodeuricomponent(url);


i have since been able client_id {remoteappurl} after adding token app manifest using:

    var clientid = remoteweburl.substring(8, 44);
    url = hostweburl + "/_layouts/15/appredirect.aspx?client_id=" + clientid + "&redirect_uri=" + encodeuricomponent(url);

this isn't ideal works fine when deployed autohosted in azure... when running remote app locally debug method results in url localhost iisexpress site instead forcing cut , paste operations debug.

is there better way?



SharePoint  ,  Apps for Office and SharePoint  >  Developing Apps for SharePoint 2013



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to send non-standard Content-Type header ?