Open MartinM85 opened 3 months ago
Thanks for writing out the specs, @MartinM85. I've got a few remarks before we move forward:
includeNestedFolders
option, wouldn't it make more sense to have the default set to false? If they want to include nested folders, they could just specify the --includeNestedFolders
flag without needing to define a boolean.m365 outlook mail searchfolder add
might work better. @pnp/cli-for-microsoft-365-maintainers, what do you think?@Jwaegebaert m365 outlook mail searchfolder add
makes more sense. Spec updated
Awesome, that works better. One more detail before we open up, regarding includeNestedFolders
. Instead of saying in the description that the default is false, I was rather considering converting this option to a flag. That when specified, you nest those folders. A bit similar to the default
and personal
flags you have in spo list view add. Be sure to also update the examples as well when you change this.
@Jwaegebaert Spec updated
Awesome work @MartinM85! I've assigned it to you.
Usage
m365 outlook mail searchfolder add [options]
Description
Creates a new mail search folder in the user's mailbox
Options
-i, --userId [userId]
userId
oruserName
, but not both.-n, --userName [userName]
userId
oruserName
, but not both.--folderName <folderName>
--sourceFolderIds <sourceFolderIds>
--includeNestedFolders
--messageFilter <messageFilter>
Examples
Create a mail search folder in the user's mailbox specified by id for messages from the inbox that contain specific subject
Create a mail search folder in the user's mailbox specified by UPN for incoming and outgoing messages from a specific year that contain specific text in a message body, search for messages inside all subfolders
Additional Info
The command requires
Mail.ReadWrite
permission.More info: https://learn.microsoft.com/graph/api/mailsearchfolder-post?view=graph-rest-1.0&tabs=http
I will work on it