名前空間: microsoft.graph
microsoftAuthenticatorAuthenticationMethod オブジェクトのプロパティとリレーションシップを読み取ります。
この API は、次の国内クラウド展開で使用できます。
グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
✅ |
✅ |
✅ |
✅ |
アクセス許可
次の表は、サポートされている各リソースの種類でこの API を呼び出すために必要な最小特権のアクセス許可またはアクセス許可を示しています。
ベスト プラクティスに従って、最小限の特権のアクセス許可を要求します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
自己に対して動作するアクセス許可
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
UserAuthenticationMethod.Read |
UserAuthenticationMethod.ReadWrite、UserAuthenticationMethod.Read.All、UserAuthenticationMethod.ReadWrite.All |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
サポートされていません。 |
サポートされていません。 |
他のユーザーに対して動作するアクセス許可
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
UserAuthenticationMethod.Read.All |
UserAuthenticationMethod.ReadWrite.All |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
UserAuthenticationMethod.Read.All |
UserAuthenticationMethod.ReadWrite.All |
重要
サインインしているユーザーが別のユーザーを操作している職場または学校アカウントで委任されたシナリオでは、サポートされているMicrosoft Entraロールまたはサポートされているロールのアクセス許可を持つカスタム ロールを割り当てる必要があります。 この操作では、次の最小特権ロールがサポートされています。
HTTP 要求
独自の Microsoft Authenticator 認証方法の詳細を取得します。
GET /me/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethodId}
注:
/me
エンドポイントの呼び出しにはサインインしているユーザーが必要であり、そのため委任されたアクセス許可が必要です。
/me
エンドポイントを使用する場合、アプリケーションのアクセス許可はサポートされません。
自分または別のユーザーの Microsoft Authenticator 認証方法の詳細を取得します。
GET /users/{id | userPrincipalName}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethodId}
省略可能なクエリ パラメーター
また、このメソッドは応答をカスタマイズするための一部の OData クエリ パラメーターをサポートします。 一般的な情報については、「OData クエリ パラメーター」を参照してください。
名前 |
説明 |
Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは応答コード 200 OK
と、応答本文に microsoftAuthenticatorAuthenticationMethod オブジェクトを返します。
例
要求
GET https://graph.microsoft.com/v1.0/users/anirban@contoso.com/authentication/microsoftAuthenticatorMethods/_jpuR-TGZtk6aQCLF3BQjA2
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Users["{user-id}"].Authentication.MicrosoftAuthenticatorMethods["{microsoftAuthenticatorAuthenticationMethod-id}"].GetAsync();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
mgc users authentication microsoft-authenticator-methods get --user-id {user-id} --microsoft-authenticator-authentication-method-id {microsoftAuthenticatorAuthenticationMethod-id}
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
microsoftAuthenticatorMethods, err := graphClient.Users().ByUserId("user-id").Authentication().MicrosoftAuthenticatorMethods().ByMicrosoftAuthenticatorAuthenticationMethodId("microsoftAuthenticatorAuthenticationMethod-id").Get(context.Background(), nil)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
MicrosoftAuthenticatorAuthenticationMethod result = graphClient.users().byUserId("{user-id}").authentication().microsoftAuthenticatorMethods().byMicrosoftAuthenticatorAuthenticationMethodId("{microsoftAuthenticatorAuthenticationMethod-id}").get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let microsoftAuthenticatorAuthenticationMethod = await client.api('/users/anirban@contoso.com/authentication/microsoftAuthenticatorMethods/_jpuR-TGZtk6aQCLF3BQjA2')
.get();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->users()->byUserId('user-id')->authentication()->microsoftAuthenticatorMethods()->byMicrosoftAuthenticatorAuthenticationMethodId('microsoftAuthenticatorAuthenticationMethod-id')->get()->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.Identity.SignIns
Get-MgUserAuthenticationMicrosoftAuthenticatorMethod -UserId $userId -MicrosoftAuthenticatorAuthenticationMethodId $microsoftAuthenticatorAuthenticationMethodId
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.users.by_user_id('user-id').authentication.microsoft_authenticator_methods.by_microsoft_authenticator_authentication_method_id('microsoftAuthenticatorAuthenticationMethod-id').get()
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod",
"id": "6803c096-c096-6803-96c0-036896c00368",
"displayName": "Sandeep's iPhone",
"deviceTag": "",
"phoneAppVersion": "6.5.4",
"createdDateTime": "2020-12-03T23:16:12Z"
}
}