3
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Macにインストールしたアプリのセキュリティ権限(PPPC)をIntuneで制御する方法

Last updated at Posted at 2025-02-10

(1)はじめに

Mac端末において一般使用者アカウントから管理者権限をはく奪する場合、厄介となるのがアプリ毎に必要なセキュリティ権限(PPPC)の設定・・・。。

こんなの↓
image.png

この設定を変更する毎にシステム管理者が端末を触って変更するのは割に合わない & 管理者権限パスワードを教えるのはナンセンス、という事でIntuneを用いて制御する方法を備忘録がてら記載。

手順

今回は「OBS Studio」を例としてIntuneより設定変更を行う。
まずは設定変更を行いたいアプリケーション(OBS Studio)をMac端末にインストールする。

OBS Studioを使う為には「画面収録」「カメラ」「マイク」「アクセシビリティ」の4つの権限が必要となる。
そのうち「カメラ」「マイク」の権限有効化には管理者権限は不必要だが、「画面収録」「アクセシビリティ」の有効化には管理者権限が必要。
image.png

インストール後、ターミナルを開き codesign コマンドを用いてアプリケーション(OBS Studio)の識別子およびコード要件を取得する。(OBS Studioのインストールパスは/Applications/OBS.app/)

codesign -dv /Applications/OBS.app/
Executable=/Applications/OBS.app/Contents/MacOS/OBS
Identifier=com.obsproject.obs-studio
Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20500 size=37445 flags=0x10000(runtime) hashes=1159+7 location=embedded
Signature size=9056
Timestamp=Jan 18, 2025 at 10:49:49
Info.plist entries=31
TeamIdentifier=2MMRE5MTB8
Runtime Version=14.5.0
Sealed Resources version=2 rules=13 files=346
Internal requirements count=1 size=220
MacBook-Air:~ b4aadminv3$ codesign -dr- /Applications/OBS.app/
Executable=/Applications/OBS.app/Contents/MacOS/OBS
designated => anchor apple generic and identifier "com.obsproject.obs-studio" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "2MMRE5MTB8")

コマンドの結果から、
①識別子(Identifier)の値(この場合 com.obsproject.obs-studio)
②コード要件(designated)の値(この場合 anchor apple generic and identifier "com.obsproject.obs-studio" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists / or certificate 1[field.1.2.840.113635.100.6.2.6] / exists / and certificate leaf[field.1.2.840.113635.100.6.1.13] / exists */ and certificate leaf[subject.OU] = "2MMRE5MTB8")
を控えておく。

上記が完了したら、Intune管理センターを開く。
デバイス → macOS → 構成 → 作成 → 新しいポリシー → 設定カタログ を選択。
image.png

ポリシー名を入力し以下の画面から「設定の追加」をクリックし、設定ピッカーから「プライバシー」→「プライバシー設定ポリシーの制御」をクリック。
image.png

OBS Studioの場合は「画面収録」「アクセシビリティ」の権限を付与する必要があるので、サービスを展開、下にスクロールし「画面キャプチャ」「アクセシビリティ」にチェックを入れる。
image.png
image.png

設定ピッカーを×で閉じ、設定を行っていく。
まずはアクセシビリティの「インスタンスの編集」をクリック。
image.png

以下の画面が表示されるので、設定を入れていく。

image.png

①「コードの要件」には、上記手順で取得したコード要件(designated)の値から「anchor apple generic and」を除いた値(identifier "com.obsproject.obs-studio" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists / or certificate 1[field.1.2.840.113635.100.6.2.6] / exists / and certificate leaf[field.1.2.840.113635.100.6.1.13] / exists */ and certificate leaf[subject.OU] = "2MMRE5MTB8"))を入力する。

②「許可」横の - アイコンをクリックし設定を削除する。

③「認可」欄は「許可」を選択。 ※サービス設定毎に許可では動かない場合もあり・・・。。

④「識別子」には上記手順で取得した識別子(Identifier)の値(com.obsproject.obs-studio)を入力。

⑤「識別子のタイプ」は「バンドルID」を選択。

⑥「静的コード」横の - アイコンをクリックし設定を削除する。

間違いがない事を確認し「保存」をクリック。

image.png

次に「画面キャプチャ」横のインスタンスの編集をクリック。
image.png

基本的にはアクセシビリティと同じ値を入力するが、「認可」欄は「標準ユーザーがシステムサービスを設定できるようにする」を選択。
image.png

入力に問題がなければ「次へ」をクリック。
image.png

スコープタグが必要なら設定を行い、ポリシーを割り付けるグループを選択しポリシー作成を完了させる。
image.png

動作確認

OBS Studioを開き、権限設定画面を開くと「アクセシビリティ」は有効となっていた。
画面収録についても、一般権限ユーザー操作で有効化が可能となっている事が確認できた。
image.png
image.png

3
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?