リスト microsoftAuthenticatorAuthenticationMethods
[アーティクル]
01/20/2022
3 人の共同作成者
この記事の内容
名前空間: microsoft.graph
microsoftAuthenticatorAuthenticationMethod オブジェクトとそのプロパティの一覧を取得します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
自己に作用するアクセス許可
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
UserAuthenticationMethod.Read, UserAuthenticationMethod.ReadWrite
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
サポートされていません。
他のユーザーに対して作用するアクセス許可
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All
管理者が別のユーザーに対して実行している委任されたシナリオでは、管理者は次のいずれかの役割をAzure ADします 。
グローバル管理者
グローバル閲覧者
特権認証管理者
認証管理者 (マスクされた電話番号のみを表示)
HTTP 要求
GET /me/authentication/microsoftAuthenticatorMethods
GET /users/{id | userPrincipalName}/authentication/microsoftAuthenticatorMethods
オプションのクエリ パラメーター
サポートされていません。
名前
説明
Authorization
ベアラー {token}。必須。
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは応答コードと、応答本文の 200 OK microsoftAuthenticatorAuthenticationMethod オブジェクトのコレクションを返します。
例
要求
GET https://graph.microsoft.com/v1.0/users/sandeep@contoso.com/authentication/microsoftAuthenticatorMethods
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var microsoftAuthenticatorMethods = await graphClient.Users["{user-id}"].Authentication.MicrosoftAuthenticatorMethods
.Request()
.GetAsync();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
const options = {
authProvider,
};
const client = Client.init(options);
let microsoftAuthenticatorMethods = await client.api('/users/sandeep@contoso.com/authentication/microsoftAuthenticatorMethods')
.get();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/users/sandeep@contoso.com/authentication/microsoftAuthenticatorMethods"]]];
[urlRequest setHTTPMethod:@"GET"];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
NSError *jsonError = nil;
MSCollection *collection = [[MSCollection alloc] initWithData:data error:&jsonError];
MSGraphMicrosoftAuthenticatorAuthenticationMethod *microsoftAuthenticatorAuthenticationMethod = [[MSGraphMicrosoftAuthenticatorAuthenticationMethod alloc] initWithDictionary:[[collection value] objectAtIndex: 0] error:&nserror];
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
MicrosoftAuthenticatorAuthenticationMethodCollectionPage microsoftAuthenticatorMethods = graphClient.users("sandeep@contoso.com").authentication().microsoftAuthenticatorMethods()
.buildRequest()
.get();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
userId := "user-id"
result, err := graphClient.UsersById(&userId).Authentication().MicrosoftAuthenticatorMethods().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"
}
]
}