Category Archives: PowerBI

Allowing a Service Principal to Scan PowerBI

PowerBI’s admin-level API’s are not enabled at the OAuth / Entra level, but need to be enabled in the PowerBI Admin Center before you can use M365Permissions to scan all your PowerBI resources for access.

  1. Go to the Entra portal and create a security group, e.g. ‘PowerBISPNAccess’
  2. Add your service principal to the new group (you can find it under Enterprise Applications):
  1. Go to the PowerBI portal and search for ‘service principals can access’ and configure as follows:

M365Permissions v1.1.4

1.1.4 finally brings unattended scanning using a service principal!

I’ve described how to first set up a service principal in a separate post.

Full changelog:

  • [Feature] Add SPN scanning
  • [Feature] Configurable connection method
  • [Feature] Scan PowerBI gateways
  • [Feature] Scan PowerBI Lakehouses and Warehouses
  • [Feature] Add view config function
  • [Feature] Client cert creation function
  • [BugFix] Fix diff scanning path issue
  • [BugFix] Exclude modified field when detecting changes

Download / Use:

M365Permissions module page | Github | PSGallery

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