Issue
Workflow does not start in response to a SharePoint list item added event.
Error Code
We can see the following error message in the HostServer log file.
"ErrorMessage","SharePoint Broker","0 System.Net.WebException: The remote server returned an error: (401) Unauthorized. at SourceCode.SmartObjects.Services.SharePoint.TransientPlanExecutor.ExecutePlan() at SourceCode.SmartObjects.Services.SharePoint.Operations.SPEvent.EventExecutableObject.ExecuteObject() at SourceCode.SmartObjects.Services.SharePoint.SharePointService.Execute(). Additional info: The remote server returned an error: (401) Unauthorized.x-ms-diagnostics : 3000014;reason='Token type is not allowed.';category='invalid_request' SPRequestGuid : 008a14a0-d04c-1000-41b8-cb38xxxxxxx Broker Method : RegisterEvent
This is also confirmed by testing the SharePoint Management 'Event' SmartObject.
Resolution
The issue is only occurred on new O365 tenants with modern authentication. For security reason, Microsoft has disabled Azure Access Control (ACS) on new Office 365 tenants by default. Running the following "set-spotenant -DisableCustomAppAuthentication $false" command should technically resolve the issue.
Install-Module -Name Microsoft.Online.SharePoint.PowerShell Import-Module Microsoft.Online.SharePoint.Powershell Connect-SPOService -Url https://xxxxx-admin.sharepoint.com -Credential admin@xxxxx.onmicrosoft.com set-spotenant -DisableCustomAppAuthentication $false
Additional Information
Related Links