-
Notifications
You must be signed in to change notification settings - Fork 332
1664 update scubagear implementation for teams 5x policy sk #1873
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
base: main
Are you sure you want to change the base?
1664 update scubagear implementation for teams 5x policy sk #1873
Conversation
Updated the Teams admin portal section to reflect changes in app management policies and provided commands for legacy implementation.
Updated note about Teams admin portal changes and app management.
Updated app permission policy checks for DefaultApp, GlobalApp, and PrivateApp tenant settings to ensure compliance with new requirements.
Added handling for certificate-based and interactive authentication scenarios, including warnings for users regarding app settings retrieval.
Updated report detail strings in legacy app permission policy checks to include additional context and validation notes.
Removed multiple test cases for MS.TEAMS.5.1v2, MS.TEAMS.5.2v2, and MS.TEAMS.5.3v2 policies.
Added parameter for new settings preference and updated warnings based on authentication method.
Added note about legacy command usage for application policies.
Emphasize the warning about legacy command usage in application policies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is in scope or should be addressed in a separate PR, but the implementation steps we have don't match what I'm currently seeing in the admin center. Take the steps for 5.1:
3. In the upper right-hand corner select **Actions**
4. Select **Org-wide app settings**.
I'm not seeing "Actions" in the upper right corner. I'm seeing "Org-wide app settings" displayed right off the bat. We might need to delete step 3.
Then for step 5:
5. Under **Microsoft apps** > Select **On**
There is no "Microsoft apps" on this page at all. This is what I see:

Does that mean 5.1 is OBE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adhilto How old is the tenant you are using? Do you still have the settings under permissions policies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adhilto Can you look in your portal and follow the v1 instructions? Let me know if you still have those in your portal. I added the v1 settings to the markdown in my branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some slight verbiage changes, but yes, I still have the old settings visible in the portal. It's a fairly old tenant. I went ahead and looked through a few of the tenants I have access to. 2 of them follow the old style and 1 of them matches the current implementation steps. I'd guess it depends on whether or not you had previously configured the legacy policies. Given that, we might want to have both sets of implementation steps. Or at least state somewhere that what they see in the admin center may differ if they previously configured the legacy policies.
| "@ | ||
| $TenantAppSettings = ConvertTo-Json @() | ||
| } | ||
| elseif ($UseNewSettings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adhilto I removed ValidateNotNullOrEmpty from the parameter. Not sure that would resolve it but curious if it was affecting the use of the parameter. Everything still functions correctly on my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't help unfortunately. I even tested on a different tenant (the one that does show me the new settings in the admin center), same thing. Next step would probably be to see if anyone else can replicate this, or if it's somehow a just me thing.
Clarified note on app management policies and usage of commands for legacy implementations.
Clarified notes regarding app management policies and legacy command usage in Teams admin portal.
Clarified usage of legacy command in Teams admin portal context.
Updated the Teams admin portal application management section to clarify the use of legacy and new policy commands.
Updated the command for setting Teams app permission policies to a single line format.
Updated instructions for managing legacy application policies in Microsoft Teams. Added detailed steps for navigating the Teams admin center and configuring app settings.
Clarified instructions regarding legacy command usage and migration to new policy settings.
Removed validation for UseNewTeamsAppSettings parameter.



🗣 Description
This PR addresses issue 1664 regarding the implementation of the new Teams app policy settings in the Teams admin portal and allows users to utilize interactive authentication to review their app policy settings.
The settings for the Unified implementation of these settings are not currently available with the use of a registered application. This means interactive authentication needs to be used for pulling the newer version settings.
Updates to the baseline to accommodate the different settings. These highlight that legacy policies should not be modified if the settings had not been changed prior.
💭 Motivation and context
Application policy settings in the Teams Admin center moved to a new location in the portal. The settings are also pulled using a different cmdlet in the Teams PowerShell Module. This change to the code adds the -UseNewTeamsAppSettings Parameter to Scubagear to allow testing of the new settings when running in interactive mode. Updates to Rego were made to accommodate both the legacy settings as well as the new unified settings.
Closes #1664
🧪 Testing
CI Pipeline passed: https://github.com/cisagov/ScubaGear/actions/runs/19543826208
Smoke test passed: https://github.com/cisagov/ScubaGear/actions/runs/19577464417
Run in non-interactive mode without the new parameter to test functionality pulling and reporting legacy Teams App settings. This should function as usual.
Invoke-SCuBA -ProductNames teams -CertificateThumbprint LongAlphanumeric -AppID ID -Organization blah -OutPath "C:\Users\blah" -ConfigFilePath "C:\Blah"Run Scubagear in interactive mode without the new parameter and it should pull legacy policies if you have them. (the policies are still available in API but not in the portal).
Invoke-SCuBA -ProductNames teams -Organization blah -OutPath "C:\Users\blah" -ConfigFilePath "C:\Blah"Finally run Scubagear in interactive mode with the new parameter.
Invoke-SCuBA -ProductNames teams -UseNewTeamsAppSettings -Organization blah -OutPath "C:\Users\blah" -ConfigFilePath "C:\Blah"Rego and export providers were modified to allow for testing.
✅ Pre-approval checklist
✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branchbutton below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
Demonstrate changes to the team for questions and comments.
(Note: Only required for issues of size
Mediumor larger)✅ Post-merge checklist