Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Teams custom cmdlets for Pre-Approval #1745

Conversation

subray2014
Copy link
Contributor

@subray2014 subray2014 commented Jan 13, 2023

Fixes #

Changes proposed in this pull request

Identity has recently exposed APIs to create pre-approval permission grant policies which allow admins to configure whether specific apps can be granted a set of permissions based on sensitivity of the involved data. Since these policies operate on an AAD app level, the Teams workload wants to build a TeamsApp-centric abstraction on top of these policies in collaboration with Identity. Teams is planning to launch a set of cmdlets which provide a simple experience to admins to pre-approve RSC permissions specific to Teams.
The current set of APIs developed by Identity operate on a set of identifiers different from the Teams ecosystem. The preapproval policy APIs work on AAD apps. In the Teams Admin Portal, admins operate on Teams Apps. They approve/block or setup policies on Teams Apps. It is expected that the RSC preapproval operation will be applied in a recursive manner on all components associated with a Teams App such as the AAD app backing it. We need a way to bridge this gap and provide admins with a way of approving RSC for Teams Apps.

This change adds a set of custom cmdlets to the Teams workload:

  1. New-MgBetaTeamsAppPreapproval - Perform the set of steps needed to create a preapproval policy and associate the AAD app backing a Teams App with it.
    Params:
    a. TeamsAppId - Id of the app being approved.
    b. ResourceSpecificApplicationPermissionsAllowedForTeams - Permissions allowed to the Teams App when installed in teams once this instance has been created.
    c. ResourceSpecificApplicationPermissionsAllowedForChats - Permissions allowed to the Teams App when installed in chats once this instance has been created.
    d. TeamLevelSensitivityLabelCondition - Condition for whether sensitivity labels must be applied on teams for this approval to take effect.
    e. SpecificSensitivityLabelIdsApplicableToTeams - If TeamLevelSensitivityLabelCondition required specific labels, then this param identifies those label Ids.

  2. Get-MgBetaTeamsAppPreapproval - Get preapproval policy associated with the AAD app backing a Teams App. This cmdlet will output a custom object which flattens the preapproval policy and provides a user friendly view to the admin.
    Params:
    a. TeamsAppId - Id of the Teams app

  3. Update-MgBetaTeamsAppPreapproval - Perform the set of steps needed to update preapproval policy associated with the AAD app backing a Teams App.
    Params:
    a. TeamsAppId - Id of the Teams app.
    b. ResourceSpecificApplicationPermissionsAllowedForTeams - Permissions allowed to the Teams App when installed in teams once this instance has been created.
    c. ResourceSpecificApplicationPermissionsAllowedForChats - Permissions allowed to the Teams App when installed in chats once this instance has been created.
    d. TeamLevelSensitivityLabelCondition - Condition for whether sensitivity labels must be applied on teams for this approval to take effect.
    e. SpecificSensitivityLabelIdsApplicableToTeams - If TeamLevelSensitivityLabelCondition required specific labels, then this param identifies those label Ids.

  4. Remove-MgBetaTeamsAppPreapproval - Remove the association between a Teams App and a pre approval policy and delete the policy.
    Params:
    a. TeamsAppId - Id of the Teams app

Other links

@subray2014 subray2014 requested review from peombwa and removed request for timayabi2020, ddyett and shemogumbe January 30, 2023 21:25
@peombwa peombwa requested a review from timayabi2020 February 6, 2023 21:09
Copy link
Member

@peombwa peombwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please singularize Teams in the command names to be consistent with existing commands:
image

*-MgBetaTeamsAppPreApproval -> *-MgBetaTeamAppPreApproval.

@peombwa peombwa merged commit cae1f90 into microsoftgraph:features/2.0 Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants