Forum Discussion
SharePoint Online - Replace the default document url in document library
Hi testpoudyal ,
no, i don't think that that is possible on SharePoint Online.
I would create a new app where the users must login using azure ad.
The app will serve the documents to the users.
It itself accesses SharePoint using an app principal and the app is doing your permissions checks.
I would either create an azure web app or perhaps a PowerApp (If accessing SharePoint using an app principal is no to complicated)
Best Regards,
Sven
thanks for your reply. Wouldn't creating an Azure app require users to start using the said app and not be accessing the documents via SharePoint? Unfortunately I don't have that liberty and the users need to access the documents via SharePoint portal. Can a SharePoint webpart connect to this Azure App and only display the documents they have permission for?
- SvenSieverdingJan 28, 2023Bronze Contributor
Hi testpoudyal,
you could redirect your users to the new Azure app.
But if you want to keep your users in SharePoint, then your app can just expose a webservice.
Then you write an SPFX webpart for your users to interact with that webservice.
But you should protect your webservice using Azure AD.
Take a look at this tutorial on how to do that with an Azure Function.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient-enterpriseapi
Best Regards,Sven