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

Add-CrmSecurityRoleToUser Missing Parameter #449

Closed
mjfara opened this issue Jan 25, 2021 · 3 comments · Fixed by #451
Closed

Add-CrmSecurityRoleToUser Missing Parameter #449

mjfara opened this issue Jan 25, 2021 · 3 comments · Fixed by #451
Labels

Comments

@mjfara
Copy link

mjfara commented Jan 25, 2021

The SecurityRoleName parameter seems to be missing from the Add-CrmSecurityRoleToUser method
This following should be added after Line 4334 in Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1

        [parameter(Mandatory=$false, Position=2)]
        [string]$SecurityRoleName
@seanmcne seanmcne added the bug label Jan 27, 2021
@seanmcne
Copy link
Owner

@mjfara great catch - this appears to have been a typo/bug introduced with some other cleanup. Thanks!

@mjfara
Copy link
Author

mjfara commented Jan 27, 2021

If anyone needs a workaround in the mean time, you can just assign a global variable with the same name before the call:

    $global:SecurityRoleName = "System Administrator"
    Add-CrmSecurityRoleToUser -conn $conn -UserId $appUser -SecurityRoleId $roleid

@seanmcne
Copy link
Owner

#451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants