-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add commands for SharePoint Embedded #5731
Comments
Nice proposal. Even though the admin part of SPE isn't exposed on Graph, it's using CSOM which is a perfect API for us to use as well. Let's try to start with the end to end story so that folks can use CLI from the very first touch with SPE to completing some scenarios, like you outlined. |
Good comment. I will research this as well and check how we may obtain that. |
Looking at the documentation, there's a cmdlet named |
Also, should Thinking of the proposed command names some more: what if we simplified the name to |
I don't have any strong opinion about the first on. For me both As for the files I guess it makes total sense to make it shorter. You may not have any files outside of the container anyway so there is no need to mention it |
That would be some nice additional commands to have. I think it makes sense to shorten |
Since it's called SharePoint embedded, doesn't it make sense to include it in the |
I disagree mainly since:
|
it depends 😉. For |
I haven't dug into it yet. What I noticed is that the API calls are relatively SharePoint-ish. You have to use the |
@milanholemans those are some good observations 👍.
I totally get it. It's really hard to go pass by all the Copilot AI stuff to reach this (SPE) place 😅
it's SharePoint-ish not SharePoint Online-ish right 😜. Well If I am not mistaken the
Currently, SPE is a public preview so the setup experience is kinda 'harsh' and I believe might still change in the future. Since SPE feature is under SPO admin site (similar like Stream App launcher tile 😜) it kinda make sense that Microsoft.Online.SharePoint.PowerShell module is used to manage that since this is the module that allows you to manage (or should allow 😉) everything you may (or may not) find under SharePoint Online admin site. It makes total sense to extend a SP module you already have (meaning SPO), with a couple of commands rather than creating a new one for some small new feature. Although Microsoft did it this way I would say we may do it 'better' 🙂 Also @milanholemans please consider my other (top of mind) arguments I had in previous post like longer naming or how I relate it to @pnp/cli-for-microsoft-365-maintainers what is your opinion on that? Should we go |
@waldekmastykarz, @Jwaegebaert I updated the |
I suggest we go with |
@waldekmastykarz ok so I checked and we may indeed add a new container type for some AAD (Entra ID) registered application using CSOM and passing the following parameters:
This is awesome 🤩 as this is the starting point of every SPE based solution. It all starts with a App registration (for this we already have a command) and the contrainer type assinged to it (this we may now add 😍🙂) |
@pnp/cli-for-microsoft-365-maintainers any additional feedback before I start specking the commands out? |
Not from me. Let's go for it 🚀 |
@pnp/cli-for-microsoft-365-maintainers So apparently I was a bit wrong. We may not associate many apps to a container type but rather Container Type is a property stamped on every Container instance. Each Container Type is owned by one Application; and each Application can own only one Container Type. |
FWIW, to save time on research, check out the postman collection the SPE team has shared: https://www.voitanos.io/blog/sharepoint-embedded-create-apps/#register-container-type-in-consumer-tenant |
Looks good @Adam-it, let's do it! |
Man, I wish I had some spare cycles to contribute to this... I will in the future, but until then, here's my contribution based on work I've been doing with the SPE engineering group and some gaps from what you can only do with SPO POSH or REST:
A lot of these are listed as research items... where are you tracking those as I can provide a TON of detail. Also, this statement in the OP isn't correct:
It should be:
|
@andrewconnell thanks for chiming in, that's a ton of great info!
Should
Should this be |
@waldekmastykarz said:
If it's an either/or, I'd have it be a separate command because there could be a scenario where you create it but want to activate it hours later. But... from the workloads I've seen, it's usually something you do immediately after creation (like creation = 2-step process: create + activate. So... having it as a separate command would be ideal, but also as an argument in the creation would also be a nice bonus.
yeah, that makes sense. I'd love to help with this... just need to find time & dig into what's involved in creating commands. It's frustrating to be forced into using SPO POSH cmdlets for some things you simply can't do easily with REST. I've been able to do almost everything with REST commands & Postman, but CLI would be so much easier. |
@andrewconnell thanks for the awesome input to this issue. I totally feel your struggles about the 'finding the time' as I had similar issues myself for the last month, mainly focusing on preparing demos and SPFx toolkit. But in April I want to increase my priority on SPE support in CLI. I will start by going over your comments and changing the initial desc. 👍 |
@andrewconnell thanks for your awesome input in this issue. Your Rock 🤩 Some comments from my side till now (I am still and will be working on that to start pushing this forward) As for:
very good comment. Done ✅. I updated the commands to As for:
Indeed 🙂. Thanks for the update. I see the docs were a bit rebuilt since I started working on this 😉 As for:
I disagree. Mainly because:
@andrewconnell what do you think about my arguments 👆. @pnp/cli-for-microsoft-365-maintainers what do you think? As for:
yes this is a very good list. For now I updated the issue description only to |
@Adam-it said, WRT the commands for performing file CRUD ops...
I understand your points. I don't have an opinion. |
I think I'd personally like the So using But that would mean that all those commands would need two extra command options ( So... just a couple of thoughts. |
How I described it is that we would still have the |
Having all SPE-related commands under one group simplifies their discovery. When you're looking for SPE stuff, you need to look at just one place, without having to understand how it's implemented in the API or in the CLI. That said, we can solve this with an alias and adding |
thanks @waldekmastykarz for your response. Thats exactly what I had in mind. So reuse the commands we have and expose then in |
What's the thinking behind using |
Doesn't have to be. If CLI finds more than one container with the same name then CLI will usually show a prompt to select the correct one based on ID. |
@andrewconnell did you ever used the |
Yes, when defining / changing billing details. |
@MathijsVerbeeck did by any chance you had some time to look into using REST calls for the |
Given that the admin interface supports the retrieval of Loop Containers, do we feel that we want to extend the spe commands with support for loop, or should we have a separate loop set of commands? |
@appieschot sorry for the very late answer 🙏 |
@Adam-it said:
IMHO, that's opening the door to creating sub-commands for every SPE app. Even if you segment it to just MSFT-created apps, if you do Loop, don't you have to do Designer as well (another app that stores its content in SPE containers)? To the best of my knowledge, there's nothing special about a Loop container... same with Microsoft Designer containers - a container is a container. Frankly, that doesn't make sense to me. I'd only expect commands for containers, not specific apps. |
+1 to what @andrewconnell said. Separate command group for Loop and other products would make sense if they exposed some special functionality. If it's just CRUD on files stored in a container, then the generic set will suffice. We could consider simplifying referring to known containers if possible and desired, but I wouldn't go further than that for the moment. |
Aim
The aim of this issue is to track and add follow-up issues for commands which would allow to manage a SharePoint Embedded (SPE) container.
What would be the benefit?
Each Container Type is owned by one Application; and each Application can own only one Container Type. The owner application may grant permission to other apps to modify containers of the owner app container type. So let's say someone developed their own app that uses SPE containers but would want an additional application (like a console helper app) to generally have an overview of all containers and it's contents of some specific container type. So CLI for M365 could be this additional helper application that when granted by the owner application of a container type, would allow (admins or developers) to list, and manage containers of that type.
https://learn.microsoft.com/en-us/sharepoint/dev/embedded/concepts/app-concepts/app-architecture
Additional role for CLI could be the managements side. Like managing container type permissions.
Commands I would add
As SharePoint Embedded is a kinda a separate thing in SharePoint I would add it as a new group. So similar like for SharePoint Online we have
spo
I would introducespe
fro SharePoint Embedded.The commands should be based on MS Graph API support and SharePoint REST API v2.1 (aka: VROOM). More info on this in the following docs:
m365 spe containertype list
- New command: m365 spe containertype list #5989m365 spe containertype get
- New command: m365 spe containertype get #5991m365 spe containertype add
- New command: m365 spe containertype add #5767m365 spe containertype add
with more options to specify application #5990m365 spe containertype set
- researching 📖... (there isSet-SPOContainerType
but I seem I may not make it work 🤔)m365 spe containertype remove
- New command: m365 spe containertype remove #5992m365 spe containertype register
- New command: m365 spe containertype register #6049m365 spe containerType permission remove
- researching 📖...m365 spe container add
- New command: m365 spe container add #6081m365 spe container list
- New command: m365 spe container list #6082m365 spe container recyclebinitem list
- New command: m365 spe container recyclebinitem list #6156m365 spe container get
- New command: m365 spe container get #6083m365 spe container remove
- New command: m365 spe container remove #6084m365 spe container restore
- New command: m365 spe container restore #6085m365 spe container activate
- New command: m365 spe container activate #6086m365 spe container permission add
- New command: m365 spe container permission add #6159m365 spe container permission set
- New command: m365 spe container permission set #6160m365 spe container permission remove
- New command: m365 spe container permission remove #6161m365 spe container permission list
- New command: m365 spe container permission list #6162m365 spe file list
- researching 📖...m365 spe file get
- researching 📖...m365 spe file add
- researching 📖...m365 spe file remove
- researching 📖...m365 spe file copy
- researching 📖...m365 spe file move
- researching 📖...m365 spe folder list
- researching 📖...m365 spe folder get
- researching 📖...m365 spe folder add
- researching 📖...m365 spe folder set
- researching 📖...m365 spe folder remove
- researching 📖...property/column
?? - researching 📖...... besides the above I am planning to add commands for managing
container
,container permissions
,container property
,container column
,container files
etc.... this is still work in progressOther things to consider
We could research if it is possible to check if the SharePoint Embedded is enabled on the user tenant and add a
ensure
command for thatTip
During development this might be helpful to browse and play around
The text was updated successfully, but these errors were encountered: