Skip to content

spo group member add docs issue #5371

@Adam-it

Description

@Adam-it

So I've noticed some inconsistent parts in the spo group member add docs.
https://pnp.github.io/cli-microsoft365/cmd/spo/group/group-member-add

First of all here

Add multiple users with the aadUserId parameter to a SharePoint group with the groupId parameter
```sh
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadUserId "56ca9023-3449-4e98-a96a-69e81a6f4983,a96c1755-8aec-4f4d-955f-08504510dc56"
```
Add multiple users with the aadUserName parameter to a SharePoint group with the groupId parameter
```sh
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadUserName "Azure group one, Azure group two"
```

I don't think there is an option like aadUserId it should be rather userId. The same for aadUserName it should be userName.

second of all in the remarks

For the `userId`, `userName`, `email`, `aadGroupId` or `aadGroupName` options you can specify multiple values by separating them with a comma. If one of the specified entries is not valid, the command will fail with an error message showing the list of invalid values.

I don't think aadGroupName may have multiple values. We should correct this


Conclusion

We should remove those examples

Add multiple users with the aadUserId parameter to a SharePoint group with the groupId parameter
```sh
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadUserId "56ca9023-3449-4e98-a96a-69e81a6f4983,a96c1755-8aec-4f4d-955f-08504510dc56"
```
Add multiple users with the aadUserName parameter to a SharePoint group with the groupId parameter
```sh
m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadUserName "Azure group one, Azure group two"
```

First of all those use options that don't exist in this command.
Second of all, there are already examples of how to add users by id or userName in this docs (couple of lines above)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions