0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Microsoft] Entra ID内のユーザーに追加情報を持たせたい

Posted at

この記事は、とりとめのないメモです。

Entrra ID ユーザーとセットで雑多な情報を格納したい

カスタムセキュリティ属性を使う

こんなシナリオで使う。

  • Extend user profiles, such as add Hourly Salary to all my employees.
  • Ensure only administrators can see the Hourly Salary attribute in my employees' profiles.
  • Categorize hundreds or thousands of applications to easily create a filterable inventory for auditing.
  • Grant users access to the Azure Storage blobs belonging to a project.

3つのデータ型がある。

  • 真偽値
  • 32ビット整数
  • 文字列

Graph APIを使用してカスタムデータを格納する

4 つの方法がある。

  1. 拡張属性
  2. ディレクトリ拡張
  3. スキーマ拡張
  4. オープン拡張

拡張属性へ格納する

onPremisesExtensionAttributes というプロパティに、15個の値を格納できる。

データ型は文字列のみ。

Active Directoryと同期している(ハイブリッドジョイン環境)だと使えない。

更新 Graph API

PATCH /users/{id | userPrincipalName}

onPremisesExtensionAttributes に格納する。

ディレクトリ拡張を使う

Entra IDに登録したアプリケーションにおいて、extensionProperty を定義する。

管理者かユーザーがアプリケーションの使用に同意すると、そのテナントで使用できるようになる。

Entra IDのオブジェクトに対して、extension_Object ID_extensionProperty名 というプロパティをセットできるようになる。

ディレクトリ拡張を定義する Graph API

POST /applications/{application ObjectId}/extensionProperties
POST /applications(appId='{appId}')/extensionProperties

スキーマ拡張を使う

ディレクトリ拡張と似たようなもの。

ディレクトリ拡張を定義する Graph API

POST /schemaExtensions

オープン拡張を使う

これもまたディレクトリ拡張と似たようなもの。
あらかじめ定義しておかなくてもいい(っぽい)。

オープン拡張を保存する Graph API

POST /users/{id|userPrincipalName}/extensions

リクエストボディ

{
  "extensionName": "string",
  "id": "String (identifier)",
  /* その他任意のプロパティ */
}

オープン拡張を読み込む Graph API

GET /users/{Id|userPrincipalName}/extensions/{extensionId}

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?