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 Tutorial Chapter about cleaning azure resources #66

Merged
merged 6 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ administrator and always log in as such unless the tutorial requires otherwise.
5. [Deploy recording sample to AKS cluster](./deploy/5-helm.md)
6. [Create and assign a Recording Policy](./deploy/6-policy.md)
7. [Verify functionality](./deploy/7-test.md)
8. [Clean up resources](./deploy/8-cleanup.md)

## Variables

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ After we successfully set up a test call we should see the a banner in both of o
![Recording Banner](../../images/screenshot-recording-banner.png)

Congratulations, we deployed and successfully configured a Compliance Recording Bot, in the next
steps we can customize the Recording Bot Application to meet our custom use-cases.
steps we can customize the Recording Bot Application to meet our custom use-cases. Or, if we wish
to delete the resources, we can continue with [cleaning up Azure resources](./8-cleanup.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Clean up Azure Resources

In this section of the tutorial, we will delete all the Azure resources we created during the
tutorial. And remove all things we created for the Compliance Recording Policy.

## Remove Compliance Recording Policy

At first we will first undo everything to create a recording policy.

### Unassign Recording Policy

Unassigning the recording policy is done very similar to assigning it:

``` pwsh
Grant-CsTeamsComplianceRecordingPolicy `
-Global `
-PolicyName $null
```

The command should complete without any output to the terminal window.

### Delete the Recording Application

We continue with deleting the recording application that links the recording policy to the
application instance:

``` pwsh
Remove-CsTeamsComplianceRecordingApplication `
-Identity 'Tag:TutorialPolicy/11111111-1111-1111-1111-111111111111'
```

The `Identity` Argument is a combination from the recording policy name and the object-id of the
application instance, it uses the pattern:

`Tag:` + name of the recording policy + `/` + the object-id of the application instance

After running the powershell command it should complete without any output.

### Delete the Recording Policy

After decouplic the application instance and the recording policy we can delete the recording
policy:

``` pwsh
Remove-CsTeamsComplianceRecordingPolicy `
-Identity 'TutorialPolicy'
```

The command should complete successful without any further output.

### Delete the Application Instance

To delete the application instance we need to delete the user principal of the application instance
in the entra id:

``` pwsh
az ad user delete --id [email protected]
```

The command should also complete without any output.

## Delete Resource Group

With deleting the Resource Group we created at the start of this tutorial, we will recursively
delete all the resources within the resource group. To delete the resource group we run:

``` pwsh
az group delete --name recordingbottutorial
```

After confirming the operation with _y_ for yes, the execution of the command takes some time and
should successfully finish without any further output.

## Delete App Registration

Since App Registrations are created within a Microsoft Entra Id Tenant and not within a
Resource Group. The deletion of the App Registration, we created during the Tutorial, needs to be
done seperately. To do so we run:

``` pwsh
az ad app delete --id cccccccc-cccc-cccc-cccc-cccccccccccc
```

If the command ran successfully it should finish without any output. The app registration can then still
be found in the deleted applications view of the [Microsoft Entra Admin Center](https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade/quickStartType~/null/sourceType/Microsoft_AAD_IAM),
the app registration can be restored there within the next 30 days.

And that is it, we deleted all Azure resources we created during the tutorial.
Loading