Forum Discussion
Jonesy6123
Jun 14, 2024Copper Contributor
Need to use SPO Service Online Powershell Module without credentials-based login for an Automation
I need to access the Sharepoint Admin Center via a Powershell Runbook through a Power Automate flow in order to perform hourly checks on Site Storage Usage in Sharepoint. I have a runbook that currently gets this data on a folder-basis with the PnP Module, but i'm unsure if this will work for this issue. My assumption is that i'll need to use the SPO Service module, but it requires credentials-based login with administrative access. Is there a way to circumvent this?
2 Replies
- tcboeiraBrass ContributorI need to carry out the same process. Access websites, measure usage and usability. In my case it is one tenant and about 80 domains
contributing differently to the total space in the environment.
I don't know exactly what you're doing, but in my case I migrated from SPO to PnP and it's been very good.
Before I had to "access" manually because of the need for authentication, now it's automated. - The SPO module does not support the client credentials flow. There is some coverage of SPO admin operations in Graph, see if the available endpoints/methods fit your needs. Otherwise, PnP is your best option.