I would like to know how to generate a list of all active users in a SharePoint Online site, and its sub sites in a csv file, including the following information:
- Date of creation of the csv file
- Last login and permissions for each user
- Groups that he belongs to
Even just a part of the answer could be useful. I'm thinking about SharePoint Online shell.
Any other coding languages are acceptable.