Get-AADExportAccessReviews.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<#
 .Synopsis
  Gets the list of access reviews via businessFlowTemplaytes
 
 .Description
  GET /accessReviews?$filter=businessFlowTemplateId eq {businessFlowTemplate-id}&$top={pagesize}&$skip=0
  https://docs.microsoft.com/en-us/graph/api/accessreview-list?view=graph-rest-beta&tabs=http#code-try-1
 
 .Example
  Get-AADExportAccessReviews
#>


Function Get-AADExportAccessReviews {
  [CmdletBinding()]
  param
  (
      [Parameter(Mandatory = $true)]
      [string[]]$Parents
  )
  
  Invoke-Graph  'accessReviews' -Filter "(businessFlowTemplateId eq '$($Parents[0])')" -ApiVersion 'beta'
}