> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/automation/runbooks/runbook-references/org/applications/delete-gsa-application-registration.md).

# Delete Gsa Application Registration

### Description

This runbook deletes a Global Secure Access application registration created by the "add-gsa-application-registration" runbook, including everything provisioned with it: the application (and thereby its service principal, application segments and connector group assignment) and the security group created by the naming scheme.

The naming scheme group is identified via the groups assigned to the application whose display name matches the admin-defined group prefix. If the group was created but never assigned (partial provisioning), a best-effort lookup by naming scheme is performed.

Safety measures:

* The runbook verifies the application is actually a GSA / App Proxy application (onPremisesPublishing) before deleting anything.
* By default only security group(s) matching the naming scheme are deleted. Other groups assigned to the application are listed but NOT deleted, as they may be shared with other applications. Set deleteAllAssignedGroups to change this.

### Location

Organization → Applications → Delete GSA Application Registration

**Full Runbook name**

rjgit-org\_applications\_delete-GSA-application-registration

### Details

| Property         | Value                                                                                   |
| ---------------- | --------------------------------------------------------------------------------------- |
| Version          | 1.2.2                                                                                   |
| Required modules | <p>RealmJoin.RunbookHelper (>= 0.8.9)<br>Microsoft.Graph.Authentication (>= 2.39.0)</p> |
| Schedulable      | no                                                                                      |

### Permissions

#### Application permissions

* **Type**: Microsoft Graph
  * Application.ReadWrite.All
    * *Finds the Global Secure Access app, verifies onPremisesPublishing and deletes it via DELETE /applications/{id}*
  * Group.ReadWrite.All
    * *Finds the app's naming-scheme access groups and deletes assigned or orphaned groups*

### Parameters

#### applicationName

The full display name of the GSA application to delete, e.g. "GSA-MyApp".

| Property            | Value                                                |
| ------------------- | ---------------------------------------------------- |
| Required            | true                                                 |
| Default Value       |                                                      |
| Type                | String                                               |
| Portal display name | Application Name (full display name, e.g. GSA-MyApp) |

#### groupPrefix

Prefix of the security group naming scheme, used to identify the group(s) to delete. Must match the groupPrefix of the add-gsa-application-registration runbook. Default: "App - Entra - GSA - ".

| Property         | Value                                  |
| ---------------- | -------------------------------------- |
| Required         | false                                  |
| Default Value    | App - Entra - GSA -                    |
| Type             | String                                 |
| Hidden in portal | yes (preset via runbook customization) |

#### groupSuffix

Optional suffix of the security group naming scheme. Default: empty.

| Property         | Value                                  |
| ---------------- | -------------------------------------- |
| Required         | false                                  |
| Default Value    |                                        |
| Type             | String                                 |
| Hidden in portal | yes (preset via runbook customization) |

#### deleteAllAssignedGroups

If true, ALL groups assigned to the application are deleted, not only the naming scheme group(s). Use with care - assigned groups may be shared with other applications. Default: false.

| Property            | Value                                                                                     |
| ------------------- | ----------------------------------------------------------------------------------------- |
| Required            | false                                                                                     |
| Default Value       | False                                                                                     |
| Type                | Boolean                                                                                   |
| Portal display name | Also delete ALL other groups assigned to the application (careful - groups may be shared) |

[Back to Runbook Reference overview](/automation/runbooks/runbook-references.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.realmjoin.com/automation/runbooks/runbook-references/org/applications/delete-gsa-application-registration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
