I'm playing around with Azure Functions, specifically a PowerShell script function. I'm wondering how I can use a script that is reaching out to SharePoint Online.
To run against SharePoint Online I would normally use the "SharePoint Online Management Shell" which is a version of PowerShell that pre-loads the SharePoint Online library so that I can use methods like Get-SPOSite, etc.
How can I include this library in my Azure Function PowerShell script so that I can use these functions? I'm assuming I need to load the library at the top of my script, but how do I load the library?
I've uploaded the DLL into my function and am trying to use:
[System.Reflection.Assembly]::LoadFrom('Microsoft.Online.SharePoint.Client.Tenant.dll')
But this doesn't appear to work. I think my issue is that I don't know the absolute path to my uploaded file. This is what I see on the left hand pane:
But I don't know what the path of these files are.
Any ideas? Documentation is frustratingly slim with the Azure Functions at the minute.