-
Notifications
You must be signed in to change notification settings - Fork 328
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
enhance spo file roleassignment command #6431
base: main
Are you sure you want to change the base?
Conversation
Thanks, we'll review it ASAP! |
@ktskumar I added the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktskumar awesome work so far 👏👏👏👏
Let's do a bit of a clean up before we merge 🚀. You Rock 🤩
|
||
`--groupName [groupName]` | ||
: The group name of the SharePoint group Specify either `upn`, `groupName`, or `principalId` but not multiple. | ||
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. | |
: The group name of the SharePoint group. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. |
@@ -26,10 +26,16 @@ m365 spo file roleassignment add [options] | |||
: The SharePoint Id of the principal. It may be either a user id or group id to add a role assignment for. Specify either `upn`, `groupName`, or `principalId` but not multiple. | |||
|
|||
`--upn [upn]` | |||
: The upn/email of user to assign role to. Specify either `upn`, `groupName`, or `principalId` but not multiple. | |||
: The upn/email of user to assign role to. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should wrap the option names in `` in the description.
: The upn/email of user to assign role to. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | |
: The upn/email of user to assign role to. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. |
This also applies to all other places below
|
||
`--groupName [groupName]` | ||
: The group name of the SharePoint group Specify either `upn`, `groupName`, or `principalId` but not multiple. | ||
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. | |
: The group name of the SharePoint group Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. This option is only used for SharePoint Online groups. |
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. | ||
|
||
`--entraGroupId [entraGroupId]` | ||
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | |
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. |
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | ||
|
||
`--entraGroupName [entraGroupName]` | ||
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | |
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. |
|
||
`--groupName [groupName]` | ||
: The group name of the SharePoint group Specify either `upn`, `groupName`, or `principalId` but not multiple. | ||
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. | |
: The group name of the SharePoint group Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. This option is only used for SharePoint Online groups. |
: The group name of the SharePoint group Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. This option is only used for SharePoint Online groups. | ||
|
||
`--entraGroupId [entraGroupId]` | ||
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | |
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. |
: ID of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | ||
|
||
`--entraGroupName [entraGroupName]` | ||
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, entraGroupId, entraGroupName, or `principalId` but not multiple. | |
: Display name of the Microsoft Entra group to add. Specify either `upn`, `groupName`, `entraGroupId`, `entraGroupName`, or `principalId` but not multiple. |
sinon.stub(spo, 'ensureEntraGroup').withArgs(webUrl, graphGroup).resolves(entraGroupResponse); | ||
|
||
|
||
sinon.stub(request, 'post').callsFake(async (opts) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's clear out a bit of this space
sinon.stub(spo, 'ensureEntraGroup').withArgs(webUrl, graphGroup).resolves(entraGroupResponse); | |
sinon.stub(request, 'post').callsFake(async (opts) => { | |
sinon.stub(spo, 'ensureEntraGroup').withArgs(webUrl, graphGroup).resolves(entraGroupResponse); | |
sinon.stub(request, 'post').callsFake(async (opts) => { |
principalId = entraSiteUser.Id; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
principalId = entraSiteUser.Id; | |
} | |
principalId = entraSiteUser.Id; | |
} |
@pnp/cli-for-microsoft-365-maintainers due to my short brake I am unassigning myself from this one so that it may be processed by someone else |
Closes #6197
Added two options
entratGroupId
andentraGroupName
to below commandsspo file roleassignement add
spo file roleassignement remove