Azure Automation Runbooks using Powershell: Push notifications error?

%3CLINGO-SUB%20id%3D%22lingo-sub-290524%22%20slang%3D%22en-US%22%3EAzure%20Automation%20Runbooks%20using%20Powershell%3A%20Push%20notifications%20error%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-290524%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%26nbsp%3Btrying%20to%20run%26nbsp%3Bsome%20PnP%20PowerShell%20commands%20in%20an%20Azure%20Runbook%20(e.g.%20Get-PnPContentType%2C%20Apply-PnPProvisioningTemplate%2C%20etc.%20)%20over%20a%20SharePoint%20site%2C%20but%20it%20keeps%20returning%20the%20error%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EThe%20Push%20Notifications%20feature%20is%20not%20activated%20on%20the%20site%3C%2FPRE%3E%3CP%3EThe%20correct%20modules%20have%20been%20imported%20and%20it%20only%20errors%20on%20some%20commands.%20Running%20the%20commands%20in%20a%20PowerShell%20window%20with%20the%20same%20credentials%20doesn't%20produce%20any%20errors%2C%20and%20activating%20the%20'Push%20Notifications'%20feature%26nbsp%3Bmanually%20and%20retriggering%20the%20Runbook%20won't%20produce%26nbsp%3Bany%26nbsp%3Berror%20output%2C%20but%20will%20say%20that%20the%20Runbook%20failed%20to%20run%203%20times.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-290524%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAutomation%20%26amp%3B%20Control%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%20PowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Erunbooks%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESite%20Designs%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1388419%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Automation%20Runbooks%20using%20Powershell%3A%20Push%20notifications%20error%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1388419%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20was%20either%20this%3A%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22typ%22%3EEnable%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EPnPFeature%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EIdentity%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22lit%22%3E41e1d4bf%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3Eb1a2%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22lit%22%3E47f7%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3Eab80%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3Ed5d6cbba3092%20%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3Eor%20upgrading%20the%20azure%20automation%20module%20to%3C%2FP%3E%3CP%3ESharePointPnPPowerShellOnline%203.21.2005.1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20running%3C%2FP%3E%3CP%3ESharePointPnPPowerShellOnline%203.20.2004.0%3C%2FP%3E%3CP%3Eand%20got%20that%20error%20if%20I%20ever%20tried%20to%20add%20a%20second%20attachment%20to%20a%20list%20item%20....%20the%20third%20item%20would%20always%20work%2C%20very%20weird.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I'm trying to run some PnP PowerShell commands in an Azure Runbook (e.g. Get-PnPContentType, Apply-PnPProvisioningTemplate, etc. ) over a SharePoint site, but it keeps returning the error below:

 

The Push Notifications feature is not activated on the site

The correct modules have been imported and it only errors on some commands. Running the commands in a PowerShell window with the same credentials doesn't produce any errors, and activating the 'Push Notifications' feature manually and retriggering the Runbook won't produce any error output, but will say that the Runbook failed to run 3 times.

1 Reply
Highlighted

It was either this:

Enable-PnPFeature -Identity 41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092 

or upgrading the azure automation module to

SharePointPnPPowerShellOnline 3.21.2005.1

 

I was running

SharePointPnPPowerShellOnline 3.20.2004.0

and got that error if I ever tried to add a second attachment to a list item .... the third item would always work, very weird.