pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
886 stars 314 forks source link

Sample script: get report for SharePoint add-ins and azure acs retirement #5774

Closed mkm17 closed 4 months ago

mkm17 commented 6 months ago

Create a sample script that provides a report detailing the retirement status of components within the current SharePoint Online tenant


Original issue

Usage

m365 spo report retirementstatus

Description

Retrieve a report detailing the retirement status of components within the current SharePoint Online tenant

Options

Option Description
-s, --sharePointAddInsOnly [sharePointAddInsOnly] To get information about SharePoint add-ins only
-e, --eventReceiversOnly [eventReceiversOnly] To get information about Event Receivers only
-a, --azureACSOnly [azureACSOnly] To get information about Azure Access Control Service only

Examples

Retrieve information regarding the retirement of Azure ACS, SharePoint add-ins, and Remote Event Receivers.

m365 spo report retirementstatus

Retrieve information specifically about the retirement status of Azure ACS only.

m365 spo report retirementstatus --azureACSOnly

Retrieve information specifically about the retirement status of SharePoint add-ins and Remote Event Receivers.

m365 spo report retirementstatus --sharePointAddInsOnly--eventReceiversOnly 

Default properties

Additional Info

Hi everyone,

I have a proposal that I believe could greatly benefit our tenant administration process. I'm thinking of creating a report that provides insights into the retirement status of various features, such as the SharePoint Online add-ins and more. This report aims to help administrators be better prepared for upcoming feature retirements, ensuring a smoother transition. Some details are available here.

While I'm not certain about the feasibility of gathering all the information needed, I'm eager to hear your thoughts and suggestions on this idea.

milanholemans commented 6 months ago

Hi, @mkm17, very nice suggestion! This could definitely be useful for a lot of people. However, I would like to know if we should make a sample script of it instead of a command. Commands should always be relevant. Over a few years when these things are marked as end-of-life, the command won't be used anymore. That's why I think it's better that we make it a sample script.

@pnp/cli-for-microsoft-365-maintainers any opinions?

waldekmastykarz commented 6 months ago

Great suggestion @mkm17 and agreed @milanholemans that it would be a better candidate for a script if we're considering the retirement angle.

Before we commit to it, we'd need to research if it's even possible.

mkm17 commented 6 months ago

@milanholemans @waldekmastykarz Ok, you are right, the script would be better. However, just in case, I would also check if there is a way to obtain this information.

waldekmastykarz commented 6 months ago

Would you be willing to help us with the research @mkm17?

mkm17 commented 6 months ago

@waldekmastykarz of course. I am not an expert in these solutions, but I will try to investigate to have a foundation for further discussion.

waldekmastykarz commented 6 months ago

We appreciate your help @mkm17. Don't hesitate to share your findings and ask for help if you're stuck at any time

mkm17 commented 5 months ago

Hi @waldekmastykarz @milanholemans, After a quick investigation, it appears that obtaining all information is achievable using the current commands contained in the CLI.

The script would proceed as follows:

Do I have missed something? Unfortunately, I do not have any custom SharePoint Add-ins on my test tenant so I cannot confirm if all information included is correct.

milanholemans commented 5 months ago

Thorough research @mkm17! Really nice! It all makes sense to me. I think app add-ins end with .app indeed. We only have to question whether we assume that the user has access to all sites because that's what we need to read every site in the tenant. Should we include an option to add the user as site collection admin to each site?

About site collection app catalogs, we can easily list them using spo site appcatalog list as well.

mkm17 commented 5 months ago

Hello @milanholemans, thanks for the tips. I had some free time, and I created an initial script in my branch. Before submitting a pull request, I have a few questions that need clarification:

  1. Is the location for the script correct (sample-scripts/tenant/...)?
  2. I tried to find examples of previous scripts, and I hope that the structure is correct.
  3. I had the opportunity to discuss with @Adam-it, and I think that using the Entra app with certificate for login could be a good idea. (in the script a user can choose a preferable method)

I still need to test the script on different tenants, but I plan to do so next week. If everything goes smoothly, we should have the script ready by the end of the following week.

Adam-it commented 5 months ago

@mkm17 we have a guide how to properly add a script sample for our repo https://pnp.github.io/cli-microsoft365/contribute/script-sample/new-script-sample

you may go over the steps and the structure and double check if it answers your questions. Don't hesitate to reach me (us) out directly if you need any kind of help or have any kind of question 👍