# EntraIdApplicationResource.AsExistingApplication

- Module: [Aspire.Hosting.Azure.EntraId](/reference/api/go/aspire.hosting.azure.entraid.md)
- Defined on: [EntraIdApplicationResource](/reference/api/go/aspire.hosting.azure.entraid/entraidapplicationresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

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
type EntraIdApplicationResource interface {
    // ... omitted for brevity
    AsExistingApplication(
        tenantId any,
        clientId any,
    ) EntraIdApplicationResource
}
```

## Signature

```go
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()`.

## Defined on

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