Retrieving a SharePoint app URL using JSOM

At occasions, I need to call apps directly from other scripts. I then need the actual app web URL and cannot launch a dialog to find this. There are APIs out there to get this but the entire URL must be constructed. I know the app domain and redirect URL, but need to fetch the app web, i.e. the masquerade URL. To do this, I can use the following snippet: function loadAppUrl(redirectUrl, appName) { // Here, I am fetching the URL to the root site.

read more