{"id":4437,"date":"2025-02-04T15:47:37","date_gmt":"2025-02-04T14:47:37","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=4437"},"modified":"2025-02-04T15:47:37","modified_gmt":"2025-02-04T14:47:37","slug":"the-selected-hybrid-worker-group-has-no-active-workers","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2025\/02\/the-selected-hybrid-worker-group-has-no-active-workers\/","title":{"rendered":"The selected Hybrid Worker Group has no active workers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>The wish<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to allow certain users to only start specific azure runbooks in an automation account, so that I wouldn&#8217;t need separate automation accounts for each role.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This worked by assigning the &#8216;Automation Runbook Operator&#8217; per runbook, and  the &#8216;Automation Job Operator&#8217; to the automation account for these users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The issue<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, some of our runbooks actually run on premises as hybrid runbooks on our Hybrid Worker Group. And when a user tried to start one of those runbooks, they received an error: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/02\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"328\" height=\"217\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/02\/image.png\" alt=\"The selected Hybrid Worked Group has no active workers. Until the worker is seen again, the job might fail to start.\" class=\"wp-image-4438\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/02\/image.png 328w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/02\/image-300x198.png 300w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;<em>The selected Hybrid Worked Group has no active workers. Until the worker is seen again, the job might fail to start.<\/em>&#8220;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The fix<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After some experimenting, I found out that assigning the &#8216;Microsoft.Automation\/automationAccounts\/hybridRunbookWorkerGroups\/hybridRunbookWorkers\/read&#8217; action (using a custom role) at the automation account scope fixed this error and allowed our users to run hybrid jobs without seeing runbooks they don&#8217;t need to see.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The wish I wanted to allow certain users to only start specific azure runbooks in an automation account, so that I wouldn&#8217;t need separate automation accounts for each role. This worked by assigning the &#8216;Automation Runbook Operator&#8217; per runbook, and the &#8216;Automation Job Operator&#8217; to the automation account for these users. The issue However, some &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2025\/02\/the-selected-hybrid-worker-group-has-no-active-workers\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The selected Hybrid Worker Group has no active workers<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-4437","post","type-post","status-publish","format-standard","hentry","category-automation","category-azure"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=4437"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4437\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=4437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=4437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=4437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}