> For the complete documentation index, see [llms.txt](https://cookiez.gitbook.io/red-team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cookiez.gitbook.io/red-team/cloud/azure/lateral-movement/application-proxy.md).

# Application Proxy

Application Proxy allows access to on-prem web applications after sign-in to Entra ID. Application proxy has following components:

– Endpoint - This is the external URL that the users browse to access the on-prem application. External users must authenticate to AAD&#x20;

– Application Proxy Service - This services runs in the cloud and passes the token provided by Entra ID to the on-prem connector&#x20;

– Application Proxy Connector - This is an agent that runs on the on-prem infrastructure and acts as a communication agent between the cloud proxy service and on-prem application. It also communicates with the on-prem AD in case of SSO

&#x20;– On-prem application - The application that is exposed using application proxy

<figure><img src="https://684105785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxmnxuDhun8NjxBfiBEr%2Fuploads%2FpNW5jo5znQhq7osuDzW8%2Fimage.png?alt=media&amp;token=4cc8b4d1-ee30-4db6-ae1f-dfc7b7fde67e" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Enumerate the applications that have application proxy

```powershell
C:\AzAD\Tools\Get-MgApplicationProxyApplication.ps1
```

<figure><img src="https://684105785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxmnxuDhun8NjxBfiBEr%2Fuploads%2FuW79wAMZ1kwoU8ABIyLa%2Fimage.png?alt=media&amp;token=aa870c34-d29f-4368-b201-71ff205595e6" alt=""><figcaption><p>Output of the above command</p></figcaption></figure>

Get the Service Principal (Enterprise Application)

```powershell
Get-MgServicePrincipal -Filter "DisplayName -eq 'Finance Management System'
```

<figure><img src="https://684105785-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxmnxuDhun8NjxBfiBEr%2Fuploads%2FkEKeinv4PaPeX7WwmVPR%2Fimage.png?alt=media&amp;token=a2ea027d-d32a-4c1a-b568-2b41045895a2" alt=""><figcaption><p>Output of the above command</p></figcaption></figure>
{% endstep %}

{% step %}

### Find users and groups assigned to the application

```powershell
C:\AzAD\Tools\Get-MP7GHiKeVCbKTgEhuyuUnkGg6HdQt5oKyX.ps1 Get-ApplicationProxyAssignedUsersAndGroups -ObjectId ec350d24-e4e4-4033-ad3f-bf60395f0362
```

{% endstep %}
{% endstepper %}
