Open MathijsVerbeeck opened 3 months ago
retainInheritedPermissions
as well?user
option? seems to be supported as well
{
"id": "123ABC",
"roles": ["write"],
"link": {
"type": "view",
"scope": "anonymous",
"webUrl": "https://1drv.ms/A6913278E564460AA616C71B28AD6EB6",
"application": {
"id": "1234",
"displayName": "Sample Application"
},
},
"hasPassword": true
}
which is a shame as we will lose a lot of useful info in the text
and csv
output mode. I wonder if it would be possible to customize the response for this mode to also print out this info 🤔 @pnp/cli-for-microsoft-365-maintainers any comments on that.
besides the above I don't currently see anything else
- any reason why in the scope we don't allow the
user
option? seems to be supported as well
It is supported now indeed. I'll add this to the scope, however this requires another option for the recipients.
Thanks for the feedback @Adam-it. I have implemented all the suggestions. Regarding the output, it's hard for me to judge.
@milanholemans, if I recall, we talked a while ago about formatting nested properties for the text
output. We ended up creating a custom property (#5900). What was the decision on handling these situations moving forward?
I think for the time being, it's ok to manipulate the result object for text etc. But in the future there will probably another way of working which we can't do right now.
in this case, I would flatten the complex to return also type
, scope
, webUrl
and other properties
Can I work on this?
Definitely!
Usage
m365 spo folder sharinglink add [options]
Description
Creates a new sharing link to a folder
Options
-u, --webUrl <webUrl>
--folderUrl [folderUrl]
folderUrl
orfolderId
but not both--folderId [folderId]
folderUrl
orfolderId
but not both--type <type>
--expirationDateTime [expirationDateTime]
--scope [scope]
--retainInheritedPermissions [retainInheritiedPermissions]
--recipients [recipients]
users
Examples
Creates a view-only anonymous sharing link of a folder by id
Creates an edit organization sharing link of a folder by url with a specific expiration date.
Creates a user sharing link of a folder by id
Default properties
No response
Additional Info
The API call to create a sharing link can be found on the following documentation: https://learn.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0