Cli-microsoft365: New-Command(s): implement usage reports for all supported Office 365 services

Created on 21 Oct 2019  路  4Comments  路  Source: pnp/cli-microsoft365

Hi guys,
I noticed that usage reporting has been implemented for the Microsoft Teams service (e.g. #1038). Everything is based on the APIs provided here.

As you can see from the documentation, reporting is also available for:

  • Outlook
  • Office 365 activations
  • Office 365 groups
  • OneDrive
  • SharePoint
  • Skype for Business
  • Yammer

The reports can be divided into usage and activity reportings. The way of pulling data is always the same.

Therefore, I was wondering if I am allowed to implement the usage reports for all missing services. If you agree, I would suggest following approach:

  • Define the first activity command (e.g. OneDrive activity) and implement a base class that implements the logic for activity based reports
  • Define the first usage command (e.g. OneDrive file usage) and implement a base class that implements the logic for usage based reports
  • Create an issue for all indidivudal reports commands and implement the logic for all possible combinations using the base classes implemented before
  • Once completed, take the current Teams commands and integrate them into the same logic inheriting from the base classes

By following these steps we might have the benefit of implementing new reports faster. And new features are more easily transferred to all report command types using these endpoints.

I am wondering, how you would like to tackle this. I see that we definitely need two issues to implement the two base commands (activity based and usage based reports). But once done, implementing new commands is just matter of minutes. Do you want to record each individual command with an individual issue?

I am willing to implement this if you let me.

br,
Patrick

question

All 4 comments

This is a very good observation @plamber. If the approach is the same, then it would make a lot of sense to consolidate the implementation. As you noticed, it would save us a lot of time and simplify our code.

Since we already have a few report commands, what if you'd start with making a base class and refactoring what we have first to ensure backward compatibility and we could then start introducing new services?

Having separate issues for all of them would make it easier to track the progress but also get others to help and track changes for the release notes. So while it's a bit more work upfront, it would have my preference.

Once again, I appreciate you sharing your thoughts. Thank you 馃憤

I am going to follow your suggestion. Next week I am going to create the first issue for the refactoring work

Perfect! Thank you! Have a great weekend!

Closing this one in favor of #1174 and #1175

Was this page helpful?
0 / 5 - 0 ratings