Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

Access SPO List from a different site collection through provider hosted addin

$
0
0

Ok so the title pretty much sums it up. I've got a developer site, i create a sharepoint addin and i can get all the information from there with no problems.

The problem is i actually want to work on a DIFFERENT site collection (get information from some lists, do some things in the backend etc etc). Its the same tenant, but a different site collection.

The Sharepoint Provider Hosted Add-in creates a client context FOR the site that it is created on (in this case the developer site, meant for testing). Is there any way for me to access a different site collection without asking for credentials/hardcoding them?

I know there's a way to create client context by hardcoding credentials, but its not usefull to me (i will to check which user visited so i can limit some things, thats where the SP Addin client context comes in). If i do it without credentials....i just get 403 cause it has no connection to the site i need to access.

IF this is not a good way to go...can you guys share some tutorials or information on how i would achieve something like this? Perhaps RestAPI ?

Hopefully i made this clear and you can help me out.



Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>