Forum Discussion

FP_Alex's avatar
FP_Alex
Copper Contributor
Jul 02, 2021
Solved

Download All Permissions Button

Hello,   I am looking for a way to programatically call or perform the same actions as the 'Download All Permission' button which can be found by going to Access Control -> Either finding a role or...
  • lukemurraynz's avatar
    Jul 04, 2021

    FP_AlexAlthough you might be able to play around with IE objects (Invoke-WebRequest), to get the CSV downloaded, You can make your own, easy enough.. I put together the following for you, which pretty much does the same thing, using the Az PowerShell Modules:

     

     

    $Providers = Get-AzProviderOperation
    
    $results = @()
    
    ForEach($Provider in $Providers)
    {
    
    
    
       $results += [pscustomobject]@{
                         'Provider NameSpace' = $Provider.ProviderNamespace
                          Description = $Provider.Description
                         'Operation Name' = $Provider.OperationName
                         Operation = $Provider.Operation
                         ResourceName = $Provider.ResourceName
    
                            
                          }
    
        }
      
      $results | Export-csv c:\temp\AzureRBACPermissions.csv -NoTypeInformation

     

     

Resources