条件付きアクセスは、ユーザーやデバイスのアクセス条件に基づいて、接続先のクラウドアプリやリソースへのアクセスを制御します。
実際によくあるシナリオとして、社給デバイスからしか、EntraID経由で、特定のクラウドアプリケーションへ接続させない というニーズがあります。
このような場合、社給デバイスの条件を「Entra ハイブリッド 参加」とし、条件を満たすデバイスでないと、接続をさせないなどのデバイス制限をかけることができます。

この記事では、「Entra ハイブリッド 参加」しているデバイスのみ、Office365アプリへ接続できるような条件付きアクセスの手順を確認します。
デバイスを「Entra ハイブリッド 参加」させる手順は、下記の記事を参考にしてください。
>> 参考記事 :【Entra ID】デバイス登録(Entra ハイブリッド参加)手順と動作確認事前準備(グループ設定)
事前準備として、使用するユーザー(hirotano)が所属するグループ(Hybrid-Join-Conditional-Access)を作成します。
「Microsoft Entra 管理センタ(https://entra.microsoft.com/)」へサインインし、「ID」>> 「グループ」>>「すべてのグループ」へ移動します。
「新しいグループ」をクリックします。

任意のグループ名(今回はHybrid-Join-Conditional-Access )とし、「メンバー」のリンクをクリックします。

「ユーザ」として「hirotano」にチェックを入れ、「選択」をクリックします。

最後に「作成」をクリックします。
条件付きアクセスの設定(Entra ID)
「Microsoft Entra 管理センタ(https://entra.microsoft.com/)」へサインインし、設定します。
「保護」から「条件付きアクセス」をクリックします。

「新しいポリシーを作成する」をクリックします。

任意の名前(今回は 社給デバイス ハイブリッド参加)を入力します。
ユーザー
ユーザー設定のリンクをクリックすると、対象、対象外のタブが出力されます。

「ユーザーとグループの選択」を選択し、「ユーザーとグループ」にチェックを入れ、「選択」の下のリンクをクリックします。

グループ(Hybrid-Join-Conditional-Access)を指定し、「選択」をクリックします。

下記のように登録されます

ターゲットリソース
ターゲットリソースとして、Office 365 アプリ全般 を対象にします。
ターゲットリソースのリンクをクリックすると、対象、対象外のタブが表示されます。

「アプリを選択」を指定し、「選択」の下のリンクをクリックします。

「選択」画面が表示されます。「Office365」を指定し、「選択」をクリックします。

下記のように、登録されます。

アクセス制御(許可)
「許可」の下のリンクをクリックします。

「許可」画面が出力されます。ここでは、アクセスをブロックするのか、もしくは、なんらか条件を付けてアクセスを許可するのかを設定します。
「アクセス権の付与」を指定のうえ、「Microsoft Entra ハイブリッド参加済みデバイスが必要」にチェックを入れ、「選択」をクリックします

ポリシーの有効化
「レポート専用」「オン」「オフ」から選択できます。早速、有効化するため、「オン」を選択します。その後、「作成」をクリックします。

これで、ポリシーが作成されました。
動作確認
まず、Entra ハイブリッド参加していないデバイス(Win11-1)より、Microsoft365ホーム(https://www.office.com/?auth=2)へアクセスします。
すると、サインイン時に下記のように、先へすすめなくなります。画面出力からは、Edgeブラウザの問題のように見受けられ、期待した出力ではないですが、エラーコードを見ると 53001(DeviceNotDomainJoined)であり、意図した動作ではと考えています。
>> 参考記事 :条件付きアクセスでのサインインに関する問題のトラブルシューティング

Entra ハイブリッド参加しているデバイス(Win11-2)より、Microsoft365ホーム(https://www.office.com/?auth=2)へアクセスすると、サインイン後、サイトが参照できます。

サインインログ
「Microsoft Entra 管理センタ」の「条件付きアクセス」画面で、「監視」>> 「サインインログ」より、Win11-1からのアクセスは、条件付きアクセスにより、失敗していることが確認できます。

コメント