{"id":340,"date":"2019-12-22T09:52:42","date_gmt":"2019-12-22T09:52:42","guid":{"rendered":"https:\/\/www.dabbler.dk\/?p=340"},"modified":"2019-12-22T09:52:42","modified_gmt":"2019-12-22T09:52:42","slug":"the-task-cannot-be-run-because-the-user-account-that-is-assigned-to-run-the-task-has-been-altered","status":"publish","type":"post","link":"https:\/\/www.dabbler.dk\/index.php\/2019\/12\/22\/the-task-cannot-be-run-because-the-user-account-that-is-assigned-to-run-the-task-has-been-altered\/","title":{"rendered":"The task cannot be run because the user account that is assigned to run the task has been altered"},"content":{"rendered":"\n<p>Have you tried to rename a company (from the Companies page or from PowerShell (Rename-NAVCompany cmdlet) in Microsoft Dynamics NAV 2018 and you get this error: &#8220;The task cannot be run because the user account that is assigned to run the task has been altered&#8221;, you are hit by a side effect of a new Service Tier Setting.<\/p>\n\n\n\n<p>A quick google of the error message yields a few results &#8211; especially this one: <a aria-label=\"https:\/\/forum.mibuso.com\/discussion\/72652\/job-queue-with-task-scheduler-and-user-id (opens in a new tab)\" href=\"https:\/\/forum.mibuso.com\/discussion\/72652\/job-queue-with-task-scheduler-and-user-id\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/forum.mibuso.com\/discussion\/72652\/job-queue-with-task-scheduler-and-user-id<\/a>&#8230; which suggest that it has something to do with the Service Tier Setting &#8220;EnableUserConsistencyValidationOnTasks&#8221;.<\/p>\n\n\n\n<p>If we look at Microsoft description of that Service Tier Setting at <a aria-label=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/business-central\/dev-itpro\/administration\/configure-server-instance (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/business-central\/dev-itpro\/administration\/configure-server-instance\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.microsoft.com\/en-us\/dynamics365\/business-central\/dev-itpro\/administration\/configure-server-instance<\/a>, we see this description:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Specifies whether user consistency checks are done on tasks. Setting this to <strong>true <\/strong>helps guard against impersonation of users in tasks. When enabled, only the user who created the task can edit the task. If a task is edited by different user account, an error similar to the following occurs: The task cannot be run because the user account that is assigned to run the task has been altered. The task has been canceled.<\/p><p>Default: true <\/p><p>Dynamically Updatable: No<\/p><\/blockquote>\n\n\n\n<p>&#8230;so if this protection is not important to you &#8211; you can easily work around the error by setting this key to false. If this protection is important to you, you should off cause just set it to false while renaming the company and then set it back to true again.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Have a Merry Christmas and a Happy New Year!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you tried to rename a company (from the Companies page or from PowerShell (Rename-NAVCompany cmdlet) in Microsoft Dynamics NAV 2018 and you get this error: &#8220;The task cannot be run because the user account that is assigned to run the task has been altered&#8221;, you are hit by a side effect of a new &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.dabbler.dk\/index.php\/2019\/12\/22\/the-task-cannot-be-run-because-the-user-account-that-is-assigned-to-run-the-task-has-been-altered\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The task cannot be run because the user account that is assigned to run the task has been altered&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":216,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[27,32,25,24,26,12],"class_list":["post-340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-nav","category-software","tag-bug","tag-business-central","tag-dynamics","tag-microsoft","tag-nav","tag-powershell"],"_links":{"self":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/comments?post=340"}],"version-history":[{"count":4,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/340\/revisions"}],"predecessor-version":[{"id":344,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/340\/revisions\/344"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media\/216"}],"wp:attachment":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media?parent=340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/categories?post=340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/tags?post=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}