rubrikinc / rubrik-powershell-sdk

The Rubrik Security Cloud SDK
https://www.powershellgallery.com/packages/RubrikSecurityCloud
MIT License
7 stars 9 forks source link

Get-RscMssqlDatabase -Name doesn’t work for user having a custom role #77

Closed SahFari closed 2 months ago

SahFari commented 3 months ago

I have a Service Account that has custom role assigned to it in RSC.

User: This user is going to be used in automation, mostly export and live mounts.

Role: This Role can take on-demand snapshots, export and mount all SQL Databases.

This command returns no info: Get-RscMssqlDatabase -Name Test

This returns all info: Get-RscMssqlDatabase -List | Where-Object {$_.Name -eq 'Test'}

I get results for both commands when I run the same script with a user that have admin role in RSC

I am running version 1.0. CDM version: 8.1.3-p7.

image

image

image

image

image

image

clumnah commented 3 months ago

I do not believe this issue has anything to do with RBAC. Based on how you were using the cmdlet, I was able to recreate the issue as an admin. I have a fix deployed to the devel branch and when a PR is merged it will be available to all.

SahFari commented 3 months ago

It works in PSVersion 7.3.9 not in PSVersion 7.4.2

SahFari commented 3 months ago

In works in PSVersion 7.4.2 and 7.3.9 after upgrading to 1.2 👍🏼

Tnx