Usage
m365 spo roledefinition add [options]
Description
Should add a new roledefinition to web
Options
| Option |
Description |
-u, --webUrl <webUrl> |
URL of the site to which role should be added |
-n, --name <name> |
role definition name |
-d, --description <description> |
role definition description |
Additional Info
I was thinking that now since we added first command to list the role definitions from web we need other as well (get, add and delete) 🤔.
In this issue I would like to consider adding a add command to create new role definition.
We may use this POST request for this
/_api/Web/RoleDefinitions
specifying this JSON in the body if the request
{
"BasePermissions":{ // 👉TBH I am still not sure why do we need this node.. need to investigate this a bit ;)
"High":"176",
"Low":"138612801"
},
"Description":"${description}",
"Name":"${name}"
}
the expected result should be a new role definition added

Usage
m365 spo roledefinition add [options]
Description
Should add a new roledefinition to web
Options
-u, --webUrl <webUrl>-n, --name <name>-d, --description <description>Additional Info
I was thinking that now since we added first command to list the role definitions from web we need other as well (get, add and delete) 🤔.
In this issue I would like to consider adding a add command to create new role definition.
We may use this POST request for this
/_api/Web/RoleDefinitionsspecifying this JSON in the body if the request
the expected result should be a new role definition added
