# EntraIdApi

- Kind: `class`
- Package: [Aspire.Hosting.Azure.EntraId](/reference/api/csharp/aspire.hosting.azure.entraid.md)
- Version: `17.0.0-preview.1.26567.5`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs)

Identifies an API that is not modeled as an Aspire resource, such as Microsoft Graph, by its well-known application ID.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public sealed class EntraIdApi
{
    // ...
}
```

## Remarks

The well-known APIs know the IDs of their most common permissions, so permissions can be requested by name. Permissions that are not in that list can be requested by supplying the permission's ID with [EntraIdApiPermission.Delegated(string)](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapipermission/methods.md#delegated-string) or [EntraIdApiPermission.Application(string)](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapipermission/methods.md#application-string). To look up an ID, read the `oauth2PermissionScopes` (delegated) or `appRoles` (application) of the API's service principal in your tenant, for example with `az ad sp show --id 00000003-0000-0000-c000-000000000000`.

## Properties

- [ApplicationId](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi/properties.md#applicationid) : `string` `get` -- Gets the API's application (client) ID, the same in every tenant for a first-party Microsoft API.
- [AzureResourceManager](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi/properties.md#azureresourcemanager) : [EntraIdApi](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi.md) `static` `get` -- Gets Azure Resource Manager ( `https://management.azure.com`), whose delegated permission is `user_impersonation`.
- [AzureStorage](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi/properties.md#azurestorage) : [EntraIdApi](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi.md) `static` `get` -- Gets Azure Storage ( `https://storage.azure.com`), whose delegated permission is `user_impersonation`.
- [DisplayName](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi/properties.md#displayname) : `string` `get` -- Gets the display name used in diagnostics.
- [MicrosoftGraph](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi/properties.md#microsoftgraph) : [EntraIdApi](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi.md) `static` `get` -- Gets Microsoft Graph ( `https://graph.microsoft.com`).

## Methods

- [FromApplicationId(string, string, string, string?)](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi/methods.md#fromapplicationid-string-string-string-string) : [EntraIdApi](/reference/api/csharp/aspire.hosting.azure.entraid/entraidapi.md) `static` -- Identifies another API, whose service principal must exist in the tenant, by its application ID.
