You are being redirected to the following URL that was not registered as the app launch URL https://xx?SPHostUrl=xx&SPLanguage=enSPClientTag=0&SPProductNumber=xx&SPAppWebUrl=xx&{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."
It is common that you may have encountered this kind of an error when you are accessing an app that you have developed and published to the SharePoint 2013.
There can be many deep reasons behind the message such as:
- Not provisioning the app web correctly
- Errors on App management service
But most of the time, it is because of not registering your app in the SharePoint.
You can simply follow the steps given below to register your app in the current SharePoint site.
First, go to Appreg.aspx page which used to register the app in http:// xxx/_layouts/15/Appreg.aspx. Then, you will find a following interface where you can register your app with SharePoint.
But you need to make sure the values you are entering are matching with the AppManifest.xml in your solution.
="1.0"="utf-8"
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
Name="ShopSAdmin" ProductID="{4813c773-d1b1-4ec6-8274-32f1152bd6b7}"
Version="1.0.0.1" SharePointMinVersion="15.0.0.0" >
<Properties>
<Title>ShopSAdmin</Title>
<StartPage>~remoteAppUrl/Pages/default.aspx?{StandardTokens}</StartPage>
</Properties>
<AppPrincipal>
<RemoteWebApplication ClientId="*" />
</AppPrincipal>
<AppPermissionRequests>
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Manage" />
</AppPermissionRequests>
</App>