azure analysis services - models

Prashantha Hosapattana 26 Reputation points
2021-02-17T21:30:13.99+00:00

In azure analysis services, how to view permissions set on models using Java REST api? Any other alternative approaches/suggestions are welcome.

Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
435 questions
0 comments No comments
{count} vote

Accepted answer
  1. Saurabh Sharma 23,666 Reputation points Microsoft Employee
    2021-02-18T20:02:39.673+00:00

    @Prashantha Hosapattana Which all permissions you are looking for ? It is possible through REST API though you can use a PowerShell script like below to get all roles and assigned members if you are looking for the same.

    [Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")  
    $ServerName = "asazure://westus2.asazure.windows.net/<servername>"  
    $DB = "adventureworks"   
    $MyServer = New-Object Microsoft.AnalysisServices.Server  
    $MyServer.Connect($ServerName)  
    $myDatabase = $myServer.Databases.Item($DB)  
      
    foreach ( $roles in $myDatabase.Model.Roles) {  
        foreach ( $role in $roles) {  
        Write-Output $role.Name  
        Write-Output "----------------------"  
        foreach ( $member in $roles.Members) {  
             "Member Name: "  + $member.Name   
              Write-Output "`n"            
            }  
            Write-Output "`n"  
          }  
    }  
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful