web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

X++ SysWorkflowWorkItem-complete SysWorkflowDocument-assertPermission User Not Found

(1) ShareShare
ReportReport
Posted on by 405
Hello everyone,
 
I am trying to request change for a workflow work item using X++ in a custom service API.
My code looks like this
 
toUser = workflowTable.Originator;

WorkflowWorkItemActionManager::dispatchWorkItemAction(
    workflowWorkItemTable,
    workflowComment,
    toUser,
    WorkflowWorkItemActionType::RequestChange,
    menuItemActionName);
But when I run this, I get the following error:

SysWorkflowWorkItem-complete SysWorkflowDocument-assertPermission 
SysWorkflowDocument-assert User {18C1AB52-F29C-44DA-957C-2C170A56FFCD} not found.
I noticed that if I go to System administration > Users and enable the user (check the Enabled) the error goes away and the code works fine.
However in my organization some users are part of hierarchy and user groups and not all users are set as enabled in D365 FO.

How can I handle cases where the workflow originator is disabled? 
Does this issue relate to Azure AD users with D365 FO?

Any advice or best practices would be appreciated.
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    296,942 Super User 2025 Season 2 on at
    X++ SysWorkflowWorkItem-complete SysWorkflowDocument-assertPermission User Not Found
    Hi D365FO Junior Dev,

    The user completing a task should be an active user with the correct security permissions to be able to execute the specific task. In case the originator left the company, you can change the owner or originator to an active user.
  • Sohaib Cheema Profile Picture
    47,259 User Group Leader on at
    X++ SysWorkflowWorkItem-complete SysWorkflowDocument-assertPermission User Not Found
    The error message indicates that the system is unable to find a user. I can guess two possible reasons for this:

    1) The workflow is trying to find the next user (for assignment of an approval task), but it is unable to do so. This typically happens in approval hierarchies — for example, when the system tries to find the manager of Person X and fails.

    2) The workflow is trying to assign an approval task to a user who no longer exists in the system.
    Every user in Dynamics has a Telemetry ID (which comes from Active Directory). In your error message, you can see the ID: 18C1AB52-F29C-44DA-957C-2C170A56FFCD.

    I would suggest looking into the setup of the user with ID Telemetry id 18C1AB52-F29C-44DA-957C-2C170A56FFCD. and role/setup this user in the workflow.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Alireza Eshaghzadeh Profile Picture

Alireza Eshaghzadeh 799 Super User 2025 Season 2

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 757 Super User 2025 Season 2

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 751 Super User 2025 Season 2

Product updates

Dynamics 365 release plans