I have a project which requires a reporting tool be included in it. I need to be able to run the Management Shell command Get-SPOSite several times a day at regular intervals. As I am dealing with an O365 tenancy I have to use Azure webjobs for this but every source I have found for running powershell scripts from a console app has been contradictory and none of them address the problem of the extra step of management shell having to connect and authenticate with the tenancy.
Can anyone explain in a few simple step how I might accomplish this