Added minimal permissions for 'teams app' commands. Closes #7519 - #7579
Open
OwnOptic wants to merge 1 commit into
Open
Added minimal permissions for 'teams app' commands. Closes #7519#7579OwnOptic wants to merge 1 commit into
OwnOptic wants to merge 1 commit into
Conversation
Contributor
|
Hi @OwnOptic, please respect our way of working and let an issue get assigned to you before working on it. This makes sure multiple people are not working on the same issue and our backlog stays up-to-date. |
Author
|
@milanholemans understood, I should have asked on #7519 before starting. For the rest of #6918 I will ask to be assigned first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Permissions section to the six
teams appcommand pages, per #7519.I do not have Dev Proxy wired to a tenant, so I read the API calls out of the command source and then read the Graph permission table for each one. The calls are
GET /appCatalogs/teamsAppsfor list and for every--namelookup,POST /appCatalogs/teamsAppsfor publish,PUT /appCatalogs/teamsApps/{id}for update,DELETE /appCatalogs/teamsApps/{id}for remove, aPOSTto/teams/{id}/installedAppsor/users/{id}/teamwork/installedAppsfor install,DELETE /teams/{id}/installedApps/{id}for uninstall, andGET /users/{id}throughentraUser.getUpnByUserIdwhen install is given--userId.Three things are worth a note.
listsaysAppCatalog.Submit, which reads oddly for a read command. That is what Learn marks least privileged forGET /appCatalogs/teamsApps, withAppCatalog.Read.Allin the higher privileged column.publish,updateandremovesayAppCatalog.ReadWrite.Allrather thanAppCatalog.Submit. The publish page says Submit "allows you to submit apps for review only, not to publish them to the catalog", and the delete page says you can only use Submit "to delete app definitions in review". The CLI does neither: publish posts withoutrequiresReview, and remove deletes a published app. Update changes an app already in the catalog, so I read it the same way.installanduninstallsayTeamsAppInstallation.ReadWriteForTeamrather thanReadWriteSelfForTeam. The permissions reference describes the Self variant as letting a Teams app install and uninstall itself, which is not what the CLI does. For the user scope the install page says outright you must useTeamsAppInstallation.ReadWriteForUser.Verified with
npm ciandnpm run buildindocs/, and compared the rendered HTML for these six pages againstteams chat message send.