you are being redirected to the following url that was not registered as the app launch url

you are being redirected to the following url that was not registered as the app launch url

You might receiver the below error when you click on any app or add-in in SharePoint 2013.

“you are being redirected to the following url that was not registered as the app launch url”

You are being redirected to the following URL that was not registered as the app launch URL https://siteurl?SPHostUrl=hostweburl&SPLanguage=enSPClientTag=0&SPProductNumber=xx&SPAppWebUrl=url&{AppContextToken}. If you trust this URL, click here to proceed to the app now. Otherwise, go back to the previous page or close this page.”

We have developed and deployed a SharePoint provider hosted add-in and when we click on the app it it showing the warning message which is difficult for the end user to understand.

you are being redirected to the following url that was not registered as the app launch url
you are being redirected to the following url that was not registered as the app launch url



This SharePoint tutorial includes

Solution:

If you have changed the domain name or you have moved your app (provider hosted app to any other IIS server) then you also need to update in the App registration page.

sharepoint 2013 app redirect not working
sharepoint 2013 app redirect not working

Check below article

How to update app registration in SharePoint online site?

Other Solution:

If you are getting the error in SharePoint 2013 on premise, then you can run the below PowerShell command:

Add-PSSnapin Microsoft.SharePoint.PowerShell
$farm = Get-SPFarm
$farm.Properties[“CustomAppRedirect”] = $true
$farm.Update()

After this the error you are being redirected to the following url that was not registered as the app launch url will not come.


About Bijay Kumar

I am Bijay from Odisha, India. Currently working with a reputed organization in Bangalore. I am Microsoft Office Servers and Services (SharePoint) MVP (4 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.

View all posts by Bijay Kumar →

Leave a Reply

Your email address will not be published. Required fields are marked *