none
Non interactive use of Sharepoint via AAD App RRS feed

  • Question

  • Hi,

    I'm developing a Xamarin app that manages projects, each project has some files in a sharepoint online document library.
    For security and estetical reasons, I don't want to connect directly to the sharepoint site from within the Xamarin app.
    Not all Xamarin users have a sharepoint licence, so that would not be possible.

    So my idea was to create a C# webservice that is accesible from the Xamarin app that would return a list of files created for a specific project. Meaning I would return filename,filetype and url, not the binary content itself.
    I would then show this list in the Xamarin app, those with a sharepoint licence can click on the file which will redirect to it's url via the browser on the device.

    The connection from the webservice to Sharepoint should not be through a username password. Something like OAuth with client id & secret. What's even more important is that it should be possible to limit the access of this 'app' to a certain document library on one specific sharepoint in read-only mode.

    I got the same solution for a Dynamics 365 access via AAD. You register a Web App in AAD with a secret, this is used for OAuth. Then in the Dynamics 365, you can add the app to the list and assign security on it. Looking for something similar for Sharepoint.

    Been looking into App Access Token (http://www.sharepointpals.com/post/Step-by-Step-Procedure-to-Create-a-Low-Trust-Provider-Hosted-App-for-Office-365-and-Host-the-AppWeb-in-Local-IIS) but not sure whether this is valid for a webservice because it needs a redirect url. Or am I missing something here?

    Something closer to what I need is Azure App Only (https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread). But I can't see anywhere how you can limit the access to a certain sharepoint site and document library.

    Any suggestions ?

    Regards,
    Sven Peeters
    • Moved by Fei Hu Monday, January 29, 2018 11:05 AM No related to C#
    Friday, January 26, 2018 8:15 AM

All replies

  • Hello Sven,

    your question is more related to Xamarin, OAuth, web service and so on, you could repost a new thread to related forum for a certain question. Xamarin forum, Asp.Net forum, Oauth forum.

    The Visual C# discuss and ask the C# programming language, IDE, libraries, samples and tools. If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

    Best Regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 29, 2018 11:04 AM