cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Adds a new command: 'spo site admin list'. Closes #5882

Open mkm17 opened this issue 1 year ago • 1 comments

Adds a new command: 'm365 spo site admin list'.

Closes #5882

Hello, could you please review the pull request below? It contains a new command for retrieving a list of administrators for SharePoint sites.

I still have some concerns, so please confirm the following:

  • Is the function to obtain the SiteId based on the SiteUrl suitable for users who are only SharePoint admins? (Similar to what is used in spo site list)
  • Is the endpoint _api/sites/owner the correct one to retrieve the primary admin of the site in regular cases (not '--asAdmin')?
  • Is it acceptable to not provide information about PrincipalType and Id in the '--asAdmin' case, since it is not provided by the /_api/SPO.Tenant/GetSiteAdministrators endpoint?

I believe I've made all the necessary changes. If everything looks good, this command could be a base for other tasks mentioned. #5874

mkm17 avatar Mar 20 '24 16:03 mkm17

Thanks @mkm17, we'll try to review it asap!

Jwaegebaert avatar Mar 20 '24 20:03 Jwaegebaert

Thanks @Adam-it for the review, I will check it and comeback soon !

mkm17 avatar Jun 17 '24 08:06 mkm17

ready to merge 🚀

Adam-it avatar Jun 25 '24 01:06 Adam-it

@Adam-it Thank you very much for your time!

mkm17 avatar Jun 25 '24 14:06 mkm17

merged manually 👍 Thank you for your awesome contribution 👏. You Rock 🤩

Adam-it avatar Jun 26 '24 00:06 Adam-it