Provide CRUD operations for site collection administrators?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 413
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 21
Description
Hello,
this is a suggestion of a command that might be useful for manipulating SharePoint site collection administrators. I haven't found a way to add and remove site collection admins from a dedicated set of commands in the CLI.
Administrators can be added/demoted from the site collection admin list by using this pseudo code.
var body = new
{
__metadata = new
{
type = "SP.User"
},
IsSiteAdmin = false
};
var user = await context.Web.EnsureUserAsync(adminUserPrincipalName);
var adminRequest = new ApiRequest(new HttpMethod("MERGE"), ApiRequestType.SPORest, $"/_api/web/getuserbyid({user.Id})", JsonSerializer.Serialize(body));
I leave it open to the team to decide if this use case is interesting enough and how to design an existing set of commands or create new ones.
Cheers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CLI's existing command patterns for SharePoint users and site administration, then examine the SharePoint REST request shown in the issue. Define whether this belongs in an existing command set or requires new commands, with completion meaning administrators can be added and removed through the CLI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100