0

I made an app that generates REST links to read specific files from the host web.

When I install this app in a top-level site it works just fine. But when I add a subsite through the admin panel and install the app there the REST links produced just return 404.

Example link working (app installed in top-level site, works fine):

https://tenant365-fba00a7db8b9bb.sharepoint.com/_api/SP.AppContextSite(@h)/web/GetFileById('%7BF677AD28-416D-4251-B2D6-BDDD94B073E9%7D')/$value?@h=%27https://tenant365.sharepoint.com%27

Example link thats not working (different app web, installed in TestSite, returns 404):

https://tenant365-cff077cabf2fe1.sharepoint.com/_api/SP.AppContextSite(@h)/web/GetFileById('%7B67283C5F-D705-46A4-9CD8-64D7A6EB9FF8%7D')/$value?@h=%27https://tenant365.sharepoint.com/sites/TestSite%27

I don't understand why this is the case. The REST link looks just fine to me, so whats wrong with it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.