1
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?

More than 1 year has passed since last update.

Graph APIでAzure ADにユーザーを作成する

Posted at

Azure ADにアプリケーションを作成

1. Azure ADで「アプリの登録」⇒「新規登録」

image.png
任意の名前を付けて作成

作成できたら「概要」からクライアントIDとテナントIDを控えておく

2. APIのアクセス許可を追加

  • Directory.ReadWrite.All
  • User.ReadWrite.All
    image.png
    ※アプリケーションにアクセス許可を追加する場合は管理者の同意が必要です。

3. 「証明書とシークレット」でクライアントシークレットを作成

image.png
値を控えておく

4. 任意のクライアントでトークン取得のAPIを実行

トークンがレスポンスされる

{
    "token_type": "Bearer",
    "expires_in": 0000,
    "ext_expires_in": 0000,
    "access_token": "ey*************"
}

任意のクライアントでGraph APIを実行

{
  "accountEnabled": true,
  "displayName": "Adele Vance",
  "mailNickname": "AdeleV",
  "userPrincipalName": "AdeleV@<Your Domain>.onmicrosoft.com",
  "passwordProfile" : {
    "forceChangePasswordNextSignIn": true,
    "password": "***********"
  }
}
1
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
1
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?