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

New command: `m365 teams meeting attendancereport get`

Open appieschot opened this issue 2 years ago • 10 comments

Usage

m365 teams meeting attendancereport get

Description

Download an attendance report for a meeting

Options

Option Description
-u, --userId [userId] The id of the user, omit to list attendance reports for current signed in user. Use either id, userName or email, not all.
-n, --userName [userName] The name of the user, omit to list attendance reports for current signed in user. Use either id, userName or email, not all.
--email [email] The email of the user that, omit to list attendance reports for current signed in user. Use either id, userName or email, not all.
-i, --id <id> The Id of the report
-f, --outputFile [outputFile] Path to the file where the report should be stored in

Examples

Gets the specified attendance report made for the current signed in user and Microsoft Teams meeting with given id

m365 teams meeting attendancereport get --meetingId MSo1N2Y5ZGFjYy03MWJmLTQ3NDMtYjQxMy01M2EdFGkdRWHJlQ --reportId MSMjMCMjNzU3ODc2ZDYtOTcwMi00MDhkLWFkNDItOTE2ZDNmZjkwZGY4

Gets the specified attendance report made for the [email protected] and Microsoft Teams meeting with given id

m365 teams meeting attendancereport get --userName [email protected] --meetingId MSo1N2Y5ZGFjYy03MWJmLTQ3NDMtYjQxMy01M2EdFGkdRWHJlQ --reportId MSMjMCMjNzU3ODc2ZDYtOTcwMi00MDhkLWFkNDItOTE2ZDNmZjkwZGY4

Additional Info

https://learn.microsoft.com/en-us/graph/api/meetingattendancereport-get?view=graph-rest-beta&tabs=http

We will need a check to make sure userName is required when they are signed in with app permissions. ⚠️ Make sure to handle error for meetings hosted in a channel as channel meetings are not supported ⚠️ Uses additional permissions, make sure to list them in PR OnlineMeetingArtifact.Read.All ⚠️ Add remark that the beta endpoint is subject to change

See m365 spo file get for saving of local files.

appieschot avatar Oct 25 '22 10:10 appieschot

Not quite sure, but I think we can also change the option --reportId to -i, --id <id>. Report stands for attendance report which is the sole functionality of this command to return such a report. 😄

Jwaegebaert avatar Oct 26 '22 08:10 Jwaegebaert

Hi @appieschot, @Jwaegebaert

Are we missing path option here?

-p, --path [path] : The local path where to save the retrieved file. Must be specified when the --asFile option is used

nanddeepn avatar Nov 25 '22 10:11 nanddeepn

Very good point @nanddeepn 👍. Thanks for pointing it out. We would need to have the --path or --outputFile in place if we are selecting --asFile.

Just a quick confirmation on that front though. @appieschot / @Jwaegebaert - When I checked the endpoint, my understanding is that, it returns as object and that being the case when you select --asFile, the users will have the option to export the file as a JSON file, something similar to this command. Is that correct?

If yes, rather than making the option as --asFile, we will keep it as --outputFile ensuring the consistent naming. Do I make sense?

arjunumenon avatar Nov 25 '22 13:11 arjunumenon

@nanddeepn so sorry! Based on the discussion in #3908 I removed the wrong parameter. Updated our specs and removed the --asFile and only kept path parameter.

appieschot avatar Nov 25 '22 15:11 appieschot

@arjunumenon I went for path as we use that here: https://pnp.github.io/cli-microsoft365/cmd/spo/file/file-get/ 🤔

appieschot avatar Nov 25 '22 15:11 appieschot

Totally understand that Appie.

My thought is, unlike spo file get where we actually have actual file to download and here we are basically getting the data as an object and generating the file for them, similar to what we have in spo report siteusagepages. That's why I thought we can follow the convention we have for the command spo report siteusagepages.

arjunumenon avatar Nov 25 '22 15:11 arjunumenon

That does indeed make sense as well. Just checked all other reports and we do have the outputfile on each of them. Will upgrade both specs. Thanks for keeping us consistent 🚀

appieschot avatar Nov 25 '22 19:11 appieschot

Can I work on this?

MathijsVerbeeck avatar Apr 05 '24 23:04 MathijsVerbeeck

Can I work on this?

Sold 🔨

Adam-it avatar Apr 06 '24 06:04 Adam-it

@appieschot I know that it's quite late, but why do you feel like saving this to an outputfile would make sense? I get that it would make sense to do this for the transcript get, because then you can get the VTT files, but not for this as this doesn't have a content call, but just returns a json object when being called.

MathijsVerbeeck avatar Apr 09 '24 18:04 MathijsVerbeeck