Coco
Coco

Reputation: 13

Get All teams where a specific app is installed

I am trying to get all teams where a specific app is installed.

I have this Powershell command: Get-TeamsApp | ogv -PassThru that returns the id of all apps in the tenant. I have also this Powershell command: Get-Team that returns all the properties of all teams in the tenant

But I don't know how to get all teams where the id (specific app) is present in my tenant.

Ive tried with powershell but with no success. Maybe using Graph API? if yes how? what command exactly?

Update : I ve tried this on Graph API:

GET https://graph.microsoft.com/beta/groups?$select=DISPLAYNAME,resourceProvisioningOptions{ "[email protected]": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/1c4340de-2a85-40e5-8eb0-4f295368978b }

still doesnt work (assuming 1c4340de-2a85-40e5-8eb0-4f295368978b is the app ID)

Upvotes: 1

Views: 1459

Answers (1)

Hilton Giesenow
Hilton Giesenow

Reputation: 10804

You should be able to do this using the Microsoft Graph PowerShell SDK. See here for installation and here for getting started if you've not used it before. After that, it's a case of working out which methods in Graph to call, and how to match those to the PowerShell commands. Specifically, you'd want:

Get Installed App - this link is to the Graph SDK docs, and you'd want the PowerShell module equivalent, which would be Get-MgTeamInstalledApp - see here for docs.

However, you'll notice that apps have two "IDs" - the one is the ID of the app definition itself, the other is an ID for the installation of the app into your specific tenant (which changes tenant by tenant of course). As a result, you might also want to look at the Graph operation to list apps in the tenant app catalog. I think that would map to Get-MgAppCatalogTeamApp, but I haven't tested it.

Upvotes: 1

Related Questions