When I try to use my app id (as specified in my manifest.json) to (1) check to see if the app is installed for a user and (2) try to install the app for a user using the above apis, it doesn't seem to work. However, there is an id that appears when listing installed apps via:
GET https://graph.microsoft.com/beta/appCatalogs/teamsApps
(my manifest.json id appears as 'externalId' in this api)
If I use this id in the above calls (/users/{user-id}/teamwork/installedApps), it seems to work. This is not documented here. Two questions:
1) Am I doing something wrong here or missing a step?
2) If not, how is a daemon application (like the proactive messaging bot I am writing) intended to get this id, since the https://graph.microsoft.com/beta/appCatalogs/teamsApps api does not support application permissions?
thanks,
Tom
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I'm also trying to find a way to get this ID programmatically, with no luck so far. As a workaround, I've resorted to manually finding this ID and adding it to some persisted tenant settings in my app, which is not ideal.
Any update on this? I'm running into a similar issue as well because I would like to programmatically fetch a channelId using the user-id and teamsAppId.
All 'installation' operations are done using the 'teamsApp' id. This is the id of the teamsApp resource whose collection is returned on a GET /appCatalog/teamsApps call.
If you only have the external app id, then please use the following query to retrieve the teamsApp id.
GET /appCatalog/teamsApps?$filter=externalId eq '{your-app's-external-id}'
Use the 'id' (say X) from the response to call into any of the installation APIs.
POST /teams/{team-id}/installedApps
{
"[email protected]":"https://graph.microsoft.com/beta/appCatalogs/teamsApps/X"
}
@tfischer, this response if kind of late, but it is not the manifest id but the system generated 'teams app id' which is used to uniquely identify any teams app in the system via the MS Graph APIs.
You need to use the teamsApp Id in the installation APIs.
@AkJo - thanks for this response! Question about this:
If you only have the external app id, then please use the following query to retrieve the teamsApp id.
GET /appCatalog/teamsApps?$filter=externalId eq '{your-app's-external-id}'
This API requires a delegated permission (AppCatalog.ReadWrite.All). Is there another API to find the internal teams app ID using the external ID with application permissions?
@erwelch , currently app context is not supported in this API. It is in our backlogs. If you were to spell out your scenario, it might help in prioritization.
@AkJo Can we please fix this doc at least? There are two issues:
Happy to submit a PR - just let me know if you agree with the two points above.
Most helpful comment
@AkJo Can we please fix this doc at least? There are two issues:
Happy to submit a PR - just let me know if you agree with the two points above.