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

Enhancement: add optional parameter to specify a folder in the app catalog for `m365 spo app add`

Open michaelmaillot opened this issue 1 year ago • 9 comments

Currently, SPFx solutions are deployed at the root of an app catalog, whether it's a tenant or a site collection one.

The idea is to add a new command option to specify a folder because in some organizations, there's only one tenant for the whole company, including the subsidiaries. In that case, permissions can be setup to not expose an app to everyone but only one subsidiary.

Property description idea:

Option Description
--catalogFolderPath [catalogFolderPath] Relative path in the tenant or site collection app catalog to add the package file. If not provided, the package file will be added to the root folder of the app catalog.

michaelmaillot avatar Sep 18 '24 13:09 michaelmaillot

That's a great feature request. Thanks for submitting this @michaelmaillot!

Looks good to go for me. @pnp/cli-for-microsoft-365-maintainers any further remarks before opening it up?

Jwaegebaert avatar Sep 18 '24 18:09 Jwaegebaert

Nice suggestion. Maybe for consistency, we should call it appCatalogFolderUrl. Let's also check if we need something similar for other app commands like spo app get.

milanholemans avatar Sep 18 '24 23:09 milanholemans

Before we do, let's double check if using folders in the app catalog is a supported scenario and we're not trying to promote something that's officially shouldn't be done (even though it's working).

@VesaJuvonen do we officially support creating folders and uploading solutions to folders in the app catalog?

waldekmastykarz avatar Sep 19 '24 07:09 waldekmastykarz

@waldekmastykarz - that's a really good question. We have not really considered the scenario at this level, but technically that should work as file is still in the catalog and this will provide proper level of grouping between the solutions if there are a lot of solutions. Let me run this through with few people internally to avoid surprises.

VesaJuvonen avatar Sep 19 '24 08:09 VesaJuvonen

Thanks for your feedback @VesaJuvonen & @waldekmastykarz.

TBH I actually met this scenario and I was the first surprised that it was actually possible. And the only thing that changes from "regular" usage of tenant app catalog is that if you set specific permissions on a folder, only people that have (read) access will be able to see apps inside, when they will browse through the org app store. But this won't impact installed ones (since compiled files are located in the clientSideAssets library).

michaelmaillot avatar Sep 19 '24 08:09 michaelmaillot

@VesaJuvonen did you had any chance to recheck this case?

Adam-it avatar Nov 28 '24 08:11 Adam-it

Hello everyone, may I ask a status update regarding this one?

michaelmaillot avatar May 20 '25 16:05 michaelmaillot

@VesaJuvonen (@waldekmastykarz), have you checked whether we can support adding folders in an app catalog? This will unblock the issue.

milanholemans avatar May 20 '25 22:05 milanholemans

Vesa is out for 2 months or so. @AJIXuMuK I was wondering if maybe you could share some feed if using folders in app catalogs to trim available apps by permissions is kind of supported behavior?

Adam-it avatar Jun 14 '25 23:06 Adam-it

@Adam-it - let me check on Monday. Sorry for the late response

AJIXuMuK avatar Jun 21 '25 21:06 AJIXuMuK

@Adam-it @michaelmaillot so. The question here is what the final goal is. Folders and permissions in the app catalog can be used to control who can ADD apps to the catalog. However, it does not affect who can USE the installed apps. All the assets are stored in a separate list and we don't sync permissions between the app catalog and the assents list.

AJIXuMuK avatar Jun 22 '25 15:06 AJIXuMuK

Hey @AJIXuMuK,

Agree on that, as I said here. However, it does control who can also SEE / INSTALL apps on a site. In the original request, I mentioned that it was because of a use case I met for one of my customers: a single tenant for a whole company which has subsidiaries. Let's say that one asked (and "paid" a subcontractor) for an app. They won't allow it to be available to others subsidiaries than its own one.

The final goal is to keep boundaries for subsidiaries, not only when it's about to add apps on the catalog, but also to see them when you want to install one on a site.

michaelmaillot avatar Jun 24 '25 17:06 michaelmaillot

thanks @michaelmaillot for the double confirmation. I think it is a really nice use case and till now I did not know something like this was possible 🙂 @AJIXuMuK what do you think?

Adam-it avatar Jun 24 '25 21:06 Adam-it

I think we're good to open it up since @AJIXuMuK comments are in line with what @michaelmaillot wants to use this for.

waldekmastykarz avatar Nov 15 '25 10:11 waldekmastykarz