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

RoleDefinitionPipeBind: specifying RoleDefinition by Id #2336

Merged
merged 3 commits into from
Sep 29, 2022

Conversation

fowl2
Copy link
Contributor

@fowl2 fowl2 commented Sep 9, 2022

Type

  • New Feature

Allow specifying RoleDefinition by Id anywhere where RoleDefinitionPipeBind is used. The (presumably rare) case where the name of role definition could parse as an integer continues to work.

Example:

## Get a role definition by ID
Get-PnPRoleDefinition 1073741829

## Rename a role definition by ID
Set-PnPRoleDefinition -Identity 1073741926 -NewRoleName "100"

## Get a role definition by name
$roleDef = Get-PnPRoleDefinition "100"

## Rename a role definition by object
Set-PnPRoleDefinition $roleDef -NewRoleName "My Custom Permission Level"

@KoenZomers
Copy link
Collaborator

Thanks @fowl2 !

@KoenZomers KoenZomers merged commit 50cb96a into pnp:dev Sep 29, 2022
@fowl2 fowl2 deleted the roleDefinitionById branch September 30, 2022 00:08
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

Successfully merging this pull request may close these issues.

2 participants