Adds a new command: 'spo site admin list'. Closes #5882
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/ownerthe 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
Thanks @mkm17, we'll try to review it asap!
Thanks @Adam-it for the review, I will check it and comeback soon !
ready to merge 🚀
@Adam-it Thank you very much for your time!
merged manually 👍 Thank you for your awesome contribution 👏. You Rock 🤩