Wednesday, January 27, 2021

PowerShell Script to get the Admin Group ID from the Azure Data Lake workspace

# Script to get the Admin Group ID from the Azure Data Lake workbook

$bearer_token = "47e3e3a69f1676c6-2"
$headers = @{"Authorization"= "Bearer $bearer_token"
"Content-Type" = "application/json" }
$hosturl="https://adb-54.14.azuredatabricks.net"
$uri="$hosturl/api/2.0/preview/scim/v2/Groups"
Invoke-RestMethod -Method 'Get' -Uri $uri -Headers $headers

#-------Below Result Output ---------------------------------------------------
totalResults : 2
startIndex   : 1
itemsPerPage : 2
schemas      : {urn:ietf:params:scim:api:messages:2.0:ListResponse}
Resources    : {@{displayName=users; members=System.Object[]; groups=System.Object[]; id=718921211231112107551}, @{entitlements=System.Object[]; displayName=admins; members=System.Object[]; 
               groups=System.Object[]; id=736317356711920}}

No comments:

Post a Comment

HTML

Script:

JS