Category Archives: Automation

The selected Hybrid Worker Group has no active workers

The wish

I wanted to allow certain users to only start specific azure runbooks in an automation account, so that I wouldn’t need separate automation accounts for each role.

This worked by assigning the ‘Automation Runbook Operator’ per runbook, and the ‘Automation Job Operator’ to the automation account for these users.

The issue

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:

The selected Hybrid Worked Group has no active workers. Until the worker is seen again, the job might fail to start.

The selected Hybrid Worked Group has no active workers. Until the worker is seen again, the job might fail to start.

The fix

After some experimenting, I found out that assigning the ‘Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups/hybridRunbookWorkers/read’ 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’t need to see.

M365Permissions v1.1.3

Well, a lot to share today! 36 commits with plenty of quality of life stuff, and some nice new features such as automatic retry of jobs when scanning multiple sources (e.g. all mailboxes). Since retrying runs the risk of getting duplicate results in the report, I’ve also added a deduplication function. Also handy for those of you who run over time and add to the same report file or want to merge reports but don’t want to deduplicate manually.

File based caching should also further improve runs over larger environments that take more than a few hours.

Full changelog:

Download / Use:

M365Permissions module page | Github | PSGallery

M365Permissions v1.1.0

Today’s release focuses on efficiency and bugfixes, no real new features other than some parameters which were moved to the set-M365PermissionsConfig function instead of having to be passed to each command.

Full changelog:

  • [Feature] Move outputFormat parameter to persistent config
  • [Feature] Move includeCurrentUser parameter to persistent config
  • [Feature] Add Verbose parameter to persistent config
  • [Feature] Faster enumeration when running concurrent jobs
  • [Feature] Memory use optimizations
  • [BugFix] Concurrent write issues with XLSX output
  • [BugFix] Handle special (non-enumerable) groups

Download / Use:

M365Permissions module page | Github | PSGallery

M365Permissions v1.0.9

Today’s release has an awesome new feature called ‘Changed Detection’, which will help you identify which permissions have changed since the previous run of M365Permissions.

Full changelog:

  • [Feature] Base support for app-only authentication
  • [Feature] Change detection (diff)
  • [Feature] Persist customizations between runs
  • [BugFix] Multi threading module load issue

Download / Use:

M365Permissions module page | Github | PSGallery

M365Permissions v1.0.8

Changes:

  • [Feature] Added ServicePrincipals to scannable resources
  • [Feature] Increase scan speed of Entra (enumeration of users and groups)
  • [Feature] Make output folder configurable
  • [Feature] Better memory handling
  • [BugFix] SpO authentication concurrent auth cache write failure

Download / Use:

M365Permissions module page | Github | PSGallery