I want to add an item to a list in SharePoint Online using a runbook in Azure Automation. Add an item as below, but the message "Push notification function is not active on site 'https://[tenantID].sharepoint.com/sites/[sitename]'" appears and I cannot add it. If you execute the same command in local PowerShell, you can add items, but I do not know the cause, so please let me know. Sorry for your inconvenience.
` $Credential = Get-AutomationPSCredential -Name 'admin' $SiteUrl = "https://[tenantID].sharepoint.com/sites/[sitename]" Connect-PnPOnline –Url $SiteUrl –Credentials (Get-Credential -Credential $Credential)
Add-PnPListItem -List $ListName -Values @{"Title" = "TestTitle";"ID" = "TestID";"Message" = "TestMessage";} `