# Microsoft Entra ID（Azure AD）

{% hint style="info" %}
これらの設定は Certificate Master ではなく、SCEPman App Service にのみ適用してください。こちらを参照してください [SCEPman Settings](https://docs.scepman.com/ja/scepman-no/application-settings).
{% endhint %}

## AppConfig:AuthConfig:ApplicationId

*Linux: AppConfig\_\_AuthConfig\_\_ApplicationId*

この [アプリケーション（クライアント）ID](https://docs.scepman.com/ja/scepman-depuroi/permissions/azure-app-registration#basic-app-registration-application-id) Microsoft Entra ID (Azure AD) のアプリ登録から取得してください。この設定はセットアップ時に構成されます。

{% hint style="warning" %}
これを「Client Secret ID」と混同しないでください。ここで必要なのは「Application (client) ID」です。
{% endhint %}

{% hint style="danger" %}
変更するとサービスに悪影響を及ぼす可能性があります！
{% endhint %}

## AppConfig:AuthConfig:ApplicationKey

*Linux: AppConfig\_\_AuthConfig\_\_ApplicationKey*

この [Application Key (client secret **値**)](https://docs.scepman.com/ja/scepman-depuroi/permissions/azure-app-registration#azure-app-registration-client-secret) Microsoft Entra ID (Azure AD) のアプリ登録から取得してください。この設定は SCEPman 1.x バージョンのセットアップ中に構成されます。SCEPman 2.x では通常この設定は使用されず、代わりに [Managed Identity authentication](https://docs.scepman.com/ja/scepman-depuroi/permissions/post-installation-config).

{% hint style="warning" %}
これを「Client Secret **ID**」と混同しないでください。ここで必要なのは「クライアント シークレット **値**」です。
{% endhint %}

{% hint style="danger" %}
変更するとサービスに悪影響を及ぼす可能性があります！
{% endhint %}

## AppConfig:AuthConfig:TenantId

*Linux: AppConfig\_\_AuthConfig\_\_TenantId*

Microsoft Entra ID (Azure AD) のテナント ID です。この設定はセットアップ中に自動的に構成されます。

{% hint style="danger" %}
変更するとサービスに悪影響を及ぼす可能性があります！
{% endhint %}

## AppConfig:AuthConfig:HomeTenantId

*Linux: AppConfig\_\_AuthConfig\_\_HomeTenantId*

SCEPman を Intune とは別のテナントで実行している場合、これは SCEPman Azure リソースをホストするテナントの ID を指定し、 [AppConfig:AuthConfig:TenantId](#appconfig-authconfig-tenantid) は Intune のテナントを指定します。この場合、より便利な [Managed Identities に基づく認証](https://docs.scepman.com/ja/scepman-depuroi/permissions/post-installation-config)を使用できず、代わりに [Azure App Registration と Client Secret を使用した認証](https://docs.scepman.com/ja/scepman-depuroi/permissions/azure-app-registration).

{% hint style="danger" %}
変更するとサービスに悪影響を及ぼす可能性があります！
{% endhint %}

## AppConfig:AuthConfig:HomeApplicationId

*Linux: AppConfig\_\_AuthConfig\_\_HomeApplicationId*

この設定は、SCEPman が Intune とは別のテナントで実行される場合にのみ使用されます。HomeApplicationId は、 `scepman-api` SCEPman と Certificate Master の App Service が実行されているテナント内のアプリ登録のアプリケーション ID を指定します。 [AppConfig:AuthConfig:ApplicationId](#appconfig-authconfig-applicationid) および [AppConfig:AuthConfig:ApplicationKey](#appconfig-authconfig-applicationkey) それぞれ、Intune が実行されているテナント内のアプリ登録のアプリケーション ID と Client Secret Value を指定します。

{% hint style="warning" %}
これを「Client Secret ID」と混同しないでください。ここで必要なのは「Application (client) ID」です。
{% endhint %}

{% hint style="danger" %}
変更するとサービスに悪影響を及ぼす可能性があります！
{% endhint %}

## AppConfig:AuthConfig:ManagedIdentityEnabledOnUnixTime

*Linux: AppConfig\_\_AuthConfig\_\_ManagedIdentityEnabledOnUnixTime*

Managed Identity に必要な権限が付与された Unix エポック時刻です。SCEPman は、この時刻の少し後（SCEPman 2.0 では 60 秒後）になってから、Managed Identity を使用してトークンを取得します。これは、その時点でのみ、トークン内のロールが CMDlet によって追加された正しい権限を反映するためです。トークンは [キャッシュを強制更新する方法がないまま 24 時間](https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=portal%2Cdotnet#configure-target-resource)キャッシュされるため、SCEPman がトークンを取得した後に権限を追加した場合は、SCEPman がその新しい権限を使用できるようになるまで最大 24 時間待つ必要があります。

{% hint style="danger" %}
変更するとサービスに悪影響を及ぼす可能性があります！
{% endhint %}
