Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
SahFari opened this issue Apr 8, 2024 · 3 comments
Closed
Assignees

Comments

@SahFari
Copy link

SahFari commented Apr 8, 2024

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
Copy link
Collaborator

clumnah commented Apr 12, 2024

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.

clumnah added a commit to clumnah/rubrik-powershell-sdk that referenced this issue Apr 12, 2024
guirava pushed a commit that referenced this issue Apr 17, 2024
* Fix to address Issue "Get-RscMssqlInstance returns back 0 records #79"

* Address Issue Running Get-MssqlDatabase -Detail throws an error with a giant blob of text #75

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

* Fix Running Get-RscMssqlAvailabilityGroup for a specific, known good ID returns no results and no error #74

* Change Log
guirava added a commit that referenced this issue Apr 26, 2024
New Features:

- New-RscNasShare cmdlet (and its companion New-RscNasShareInput cmdlet to build the input arguments).

Fixes:
- Fix to Get-RscMssqlInstance to address Issue #79
- Fix to Get-RscMssqlInstance to address Issue #73
- Fix to Get-RscMssqlDatabase to address Issue #75
- Fix to Get-RscMssqlDatabase to address Issue #77
- Fix to Get-RscMssqlAvailabilityGroup to address Issue #74
- Fix to Get-RscSnapshot (SnapshotListQuery)

Breaking Changes:

- Type object's Next() method was renamed GetNext() to follow
  PowerShell naming convention (and to make it clear that
  `$obj.Next() = $x` can't work (but `$obj.SetNext($x)` does.)).
- Protect-RscSnappable renamed to Protect-RscWorkload to conform to marketing language
- Removed Backup-RscSlaDomain.ps1 (Backup-SlaDomain) as it did not conform to PowerShell naming standards. Please use Protect-RscWorkload to assign an SLA.
@SahFari
Copy link
Author

SahFari commented Apr 29, 2024

It works in PSVersion 7.3.9 not in PSVersion 7.4.2

@SahFari
Copy link
Author

SahFari commented May 2, 2024

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

Tnx

@clumnah clumnah closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants