Access sharepointonline list from azure hosted .net app service

%3CLINGO-SUB%20id%3D%22lingo-sub-277989%22%20slang%3D%22en-US%22%3EAccess%20sharepointonline%20list%20from%20azure%20hosted%20.net%20app%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-277989%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%20I%20am%20doing%20a%20PoC%20in%20which%20I%20had%20a%20list%20in%20sharepointonline%20site%20whose%20data%20is%20needed%20to%20be%20consumed%20by%20external%20entity%20(Webpage%2Fmobile%20app).%26nbsp%3B%20If%20somehow%20list%20data%20is%20exposed%20via%20rest%20services%20then%20this%20can%20be%20achieved.%20Sharepointonline%20list%20exposed%20its%20rows%20by%20default%20as%20REST%20but%20in%20sharepoint%20context%20itself.%20Is%20it%20possible%20to%20access%20the%20list%20data%20from%20outside%20the%20sharepoint%20context%20(How%20to%20get%20access%20token).%20Any%20help%20in%20form%20of%20code%20sample%20will%20b%20every%20helpful.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278059%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20sharepointonline%20list%20from%20azure%20hosted%20.net%20app%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278059%22%20slang%3D%22en-US%22%3EIs%20it%20not%20possible%20for%20you%20to%20use%20CSOM%3F%20If%20the%20answer%20is%20no%2C%20what%20you%20can%20do%20is%20create%20an%20Azure%20Function%20that%20gets%20the%20data%20of%20the%20SPO%20List%20and%20then%20you%20can%20call%20this%20Azure%20function%20from%20a%20Web%20%2F%20Mobile%20App%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-277997%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20sharepointonline%20list%20from%20azure%20hosted%20.net%20app%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-277997%22%20slang%3D%22en-US%22%3E%3CP%3EI%20think%20the%20same%20problem%20of%20authentication%20happens%20in%20Flow%20also%20as%20sharepoint%20works%20in%20its%20own%20context.%20Problem%20is%20How%20to%20get%20the%20Authentication%20Token%20for%20a%20sharepoint%20online%20site.%3C%2FP%3E%3CP%3ERegards%2C%3CBR%20%2F%3EVipin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-277992%22%20slang%3D%22en-US%22%3ERe%3A%20Access%20sharepointonline%20list%20from%20azure%20hosted%20.net%20app%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-277992%22%20slang%3D%22en-US%22%3EHave%20you%20looked%20at%20using%20Flow%20to%20extracting%20the%20data%3F%3C%2FLINGO-BODY%3E
New Contributor

Hello ,

 

Currently I am doing a PoC in which I had a list in sharepointonline site whose data is needed to be consumed by external entity (Webpage/mobile app).  If somehow list data is exposed via rest services then this can be achieved. Sharepointonline list exposed its rows by default as REST but in sharepoint context itself. Is it possible to access the list data from outside the sharepoint context (How to get access token). Any help in form of code sample will b every helpful.

3 Replies
Have you looked at using Flow to extracting the data?

I think the same problem of authentication happens in Flow also as sharepoint works in its own context. Problem is How to get the Authentication Token for a sharepoint online site.

Regards,
Vipin

Is it not possible for you to use CSOM? If the answer is no, what you can do is create an Azure Function that gets the data of the SPO List and then you can call this Azure function from a Web / Mobile App