# AsExistingApplication

- Module: [Aspire.Hosting.Azure.EntraId](/reference/api/go/aspire.hosting.azure.entraid.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`
- Defined on: [`EntraIdApplicationResource`](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

References an existing registration without undoing the Azure provisioning setup enabled when this resource was added.

## Remarks

The registration itself is not provisioned or queried. Deployment can still require Azure authentication and configuration.
Use addExistingEntraIdApplication instead for a configuration-only AppHost without Azure setup.
Throws before changing the resource if registration-only configuration was already applied.

## Definition

```go
func (EntraIdApplicationResource) AsExistingApplication(
    tenantId any,
    clientId any,
) EntraIdApplicationResource
```

## Parameters

- `tenantId` (`any`) -- The registration's home tenant GUID or domain, as a literal or parameter.
- `clientId` (`any`) -- The registration's application client GUID, as a literal or parameter.

## Returns

[`EntraIdApplicationResource`](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md) -- The registration builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`EntraIdApplicationResource`](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md)
