0

I am using Get-AzRoleAssignment to get RBAC details for Data Lake Storage Gen1 resource.

Command :

Get-AzRoleAssignment -ResourceGroupName "test" -ResourceName  "testResource" -ResourceType "Microsoft.DataLakeAnalytics/accounts"

Above command gives us list of resources who have access to resource mentioned. Since first use of this command we have removed access for many resources but command still return names for those. I logged out and logged in multiple times to check if its caching issue but no use.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • How did you remove access for those many resources? – Palo Jun 09 '20 at 03:58
  • I removed them from Azure portal. I dont see those in Azure portal but PowerShell command returns those. – sujit gavhane Jun 09 '20 at 04:08
  • If you want to get the role assignment of Data Lake Gen1 resource, the resource type should be `Microsoft.DataLakeStore/accounts` (https://learn.microsoft.com/en-us/rest/api/datalakestore/accounts/listbyresourcegroup). The `Microsoft.DataLakeAnalytics/accounts` is the resource Azure Data Lake Analytics account's resource type. Please update `-ResourceType "Microsoft.DataLakeAnalytics/accounts"` as `-ResourceType "Microsoft.DataLakeStore/accounts"` then run your script again. – Jim Xu Jun 09 '20 at 08:34
  • Hi Sujit, is Jim's suggestion helpful? – Allen Wu Jul 02 '20 at 02:11

0 Answers0