Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to get the permissions on my workspaces (Via Powershell (and) API....)
These are the modern workspaces
For example, I would like to see which security group (or UPN) has the role viewer or member on such or such modern work space ?
I test this power shell script below, but it doesn't return anything correct
Ideally ,If a person has a script regarding this need on applications, I am also a taker
Thanks a lot for any help
Best regards and merci
Christophe
Import-Module MicrosoftPowerBIMgmt
$password = "XXXXXXXXX" | ConvertTo-SecureString -asPlainText -Force
$username = "XXXXXXXXXX"
$credential = New-Object System.Management.Automation.PSCredential($username, $password)
Connect-PowerBIServiceAccount -Credential $credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-Credential $credential `
-Authentication Basic `
-AllowRedirection
Import-PSSession $Session
$Groups = Get-UnifiedGroup #-Scope Organization
$Groups | ForEach-Object {
$group = $_
Get-UnifiedGroupLinks -Identity $group.Name -LinkType Members -ResultSize Unlimited | ForEach-Object {
$member = $_
New-Object -TypeName PSObject -Property @{
Member = $member.Name
Group = $group.Name
}
}
} | Export-CSV "C:\\Users\\LLLLLLL\\OneDrive\\Documents\\RRRR\\Power BI\\Administration\PowerShell\\WSPowerBIGroupMembers_unified.csv" -NoTypeInformation -Encoding UTF8
Remove-PSSession $Session
Disconnect-PowerBIServiceAccount
Solved! Go to Solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.