![]() ![]() The good news is, that when we’re logged into a portal using Azure AD, we’re in precisely the same situation, so the same technique applies. In a previous blog post, I wrote about getting a SharePoint OAuth token within a Dynamics 365 Web Resource. The SharePoint REST API requires that we pass an OAuth Bearer token as part of our request for authentication. So, since we have the URL of our SharePoint server, and the folder we’re interested in, we have everything to construct our request to retrieve the list of files – except for authentication. ![]() The good news is that this is exactly what is in the Absolute URL field in the SharePoint Site entity that we obtained in the previous post, and is contained in the sharepointsiteurl Liquid variable. However, if you created a different SharePoint site, the URL looks something like. If you’re using the default site, then site url is simply the URL of your SharePoint instance (for example, ). url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files However, the documentation is pretty good, and what we’re trying to do in this scenario is basic and only requires a single call to get a list of the files in a particular folder: If you’re not familiar with SharePoint, there is a bit of a learning curve to using the REST API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |