Runing PowerShell script from Azure Automation via Workbook not working
I hope someone here can help me, because apparently the guys behind the Azure chat support are clueless or have zero knowledge of what they are doing, it took two people to wast one hour to wonder around what the problem is. and then they send me to write this post and pray for someone to help! Amen!
Here is the story:
I'm trying to create an Azure Automation workbook to run Powers hell scripts again Power Platform such as get a list of all apps or flows, or connectors, or run script against SharePoint Online to submit a usage report for every site collection. Running everything locally in PS is working as expected, but in Azure not. After configuring the Credentials
and installing the required modules
Ruing for example this script which sends an email with all site collection storage usage, is not working
Same for PowerPlatform
In CMDLETS i dont see PowerPlafrom modules there on PnPOnline
any idea why cmds are not running in the cloud or what might be wrong here?
I follow instructions for both in this sites
I might not have a full answer to your problem, I was just wondering if you tried to switch to a different module - PnP.PowerShell - it seems that SharePointPnPPowerShellOnline is not maintained anymore.
Also, I found a similar problem at TechCommunity and the advice there was to use Connect-PnPOnline with different parameters for non-interactive logons: AppId and AppSecret. That might solve the problem as well. The error log you shared shows that your runbook for SharePoint Online fails on authentication, so other commands are failing too.
@radoslavov - Hello, did the above solution provided by David work?
Sign in to comment