As an initiative to move to a single app for SP and OD, we are automating the deletion of unused enterprise apps. As a part of automation, we are deleting unused apps from Rubrik DB and the Rubrik creator tenant. Whereas the apps are not getting deleted from the customer tenant as we do not have sufficient privileges. We would need an Application.ReadWrite.All permission to delete apps that we do not have currently.
After talking internally with PM and Eng, we decided that the customer can themselves go to their Microsoft portal and delete apps if needed. In case, we end up creating a lot of apps, then it can be cumbersome for the customer to delete those. Hence, this Powershell script will be used to delete those apps.
Related Issue
Motivation and Context
This script makes it easy for the customer to delete bulk unused apps.
How Has This Been Tested?
Ran the script with different input to make sure it is robust against incorrect input parameters.
Validated with empty RSC account name and it exits gracefully with the error message.
Validated with incorrect AppType and it exits gracefully with the error message.
Validated with incorrect DryRun value and it exits gracefully with the error message.
Provided correct value of accountName, appType and multiple appIds with dryRun as false, it only prints the apps which is going to be deleted.
Provided correct value of accountName, appType and multiple appIds with dryRun as true, it is able to delete apps.
Screenshots (if appropriate):
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!
[ ] My change requires a change to the documentation.
Description
As an initiative to move to a single app for SP and OD, we are automating the deletion of unused enterprise apps. As a part of automation, we are deleting unused apps from Rubrik DB and the Rubrik creator tenant. Whereas the apps are not getting deleted from the customer tenant as we do not have sufficient privileges. We would need an Application.ReadWrite.All permission to delete apps that we do not have currently.
After talking internally with PM and Eng, we decided that the customer can themselves go to their Microsoft portal and delete apps if needed. In case, we end up creating a lot of apps, then it can be cumbersome for the customer to delete those. Hence, this Powershell script will be used to delete those apps.
Related Issue
Motivation and Context
This script makes it easy for the customer to delete bulk unused apps.
How Has This Been Tested?
Ran the script with different input to make sure it is robust against incorrect input parameters.
Screenshots (if appropriate):
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!