While creating work order record, I got following error:
“Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The user with SystemUserId=2….. in OrganizationContext=5…… is not licensed, and its SystemUserAccessMode is not either of (NonInteractive, SetupUser)……..”
First thing I checked if the current user Access Mode is not set to Administrative or non-interactive as the error message was saying, but it was configured correctly (it was set as Read-Write mode). Next, I compared user id with the current user and it was not matching, then looked TraceText details and found this error was coming from SlaPostCreatePlugin.
Next, I checked if there is any SLAs exists and found two SLAs for the work order. While checking SLA record I found the owner of the SLA was a disabled user, assigning SLA record to enabled user solved this issue.
Hope it will help someone !!