I am successfully able to add a Custom Tab to a Team / Channel via Programmatically Create Channel Tab (not from Configure popup)
However, the POST request shape looks something like
{
"displayName": "my-title-display-name",
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/bd839104-9f20-4a1f-bbb9-226897156642",
"configuration": {
"contentUrl": "https://myurl.com/index.html",
}
}
the problem is determining the "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/bd839104-9f20-4a1f-bbb9-226897156642"
part
The "bd839104-9f20-4a1f-bbb9-226897156642" GUID here does not work, even if it is defined in my manifest.json:
(the error message is
Microsoft.Graph.ServiceException: 'Code: InvalidRequest
Message: App id bd839104-9f20-4a1f-bbb9-226897156642 needs to be installed to the team 07331d69-xxxxx and be in an unblocked state to install/update a tab
)
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.44",
"id": "bd839104-9f20-4a1f-bbb9-226897156642",
"packageName": "software.random.com",
"developer": {
"name": "Random Software",
(etc)
I used the Microsoft Graph /teams/id/installedApps
and found a random GUID (the last one in the list, my custom app) and used that GUID successfully. (it is base64 encoded)
Question
How to I map from the manifest.json ID to the installedApp id?
I see the difference between the developer generated id and the AppCatalog Id; but only Global Admins have access to this graph endpoint (ref https://learn.microsoft.com/en-us/graph/api/teamsapp-list?view=graph-rest-1.0)