We're currently developing an SharePoint Online app that is hosted in Azure. We can navigate to the app via the Site Contents of the page and loads correctly. What we would ideally like is to be able to navigate a particular page in our app (it contains around 10 pages displaying different information) from SharePoint.
We have added a custom link on the menu in SharePoint using the AppRedirect.aspx, including other query string like the client_id and SPHostUrl, however, the issue lies when trying to access the separate pages. We receive an "object reference not set to an instance of an object" error, which is relating to the app not finding the ClientContext in our app. It is like the app is not authenticating correctly. The strange thing is that when we go to the default home page of the app, it authenticates, then allows us to navigate to the separate pages from the menu.
Is there some level of authentication we are missing to allow users to navigate to a certain page on our app without them having to first go to the default app home page to authenticate? We've been trying to resolve this for a while, but to no avail.