名前空間: microsoft.graph
重要
Microsoft Graph の /beta
バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
ユーザーの 1 つの Microsoft Authenticator パスワードレス電話サインイン メソッド オブジェクトを 取得します。
この API は、次の国内クラウド展開で使用できます。
グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
✅ |
✅ |
✅ |
✅ |
アクセス許可
次の表は、サポートされている各リソースの種類でこの API を呼び出すために必要な最小特権のアクセス許可またはアクセス許可を示しています。
ベスト プラクティスに従って、最小限の特権のアクセス許可を要求します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
自己に対して動作するアクセス許可
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
UserAuthenticationMethod.Read |
UserAuthenticationMethod.ReadWrite、UserAuthenticationMethod.Read.All、UserAuthenticationMethod.ReadWrite.All |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
UserAuthenticationMethod.Read.All |
UserAuthenticationMethod.ReadWrite.All |
他のユーザーに対して動作するアクセス許可
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
UserAuthenticationMethod.Read |
UserAuthenticationMethod.ReadWrite、UserAuthenticationMethod.Read.All、UserAuthenticationMethod.ReadWrite.All |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
UserAuthenticationMethod.Read.All |
UserAuthenticationMethod.ReadWrite.All |
重要
サインインしているユーザーが別のユーザーを操作している職場または学校アカウントで委任されたシナリオでは、サポートされているMicrosoft Entraロールまたはサポートされているロールのアクセス許可を持つカスタム ロールを割り当てる必要があります。 この操作では、次の最小特権ロールがサポートされています。
HTTP 要求
独自の Microsoft Authenticator パスワードレス電話サインイン認証方法の詳細を取得します。
GET /me/authentication/passwordlessMicrosoftAuthenticatorMethods/{id}
注:
/me
エンドポイントの呼び出しにはサインインしているユーザーが必要であり、そのため委任されたアクセス許可が必要です。
/me
エンドポイントを使用する場合、アプリケーションのアクセス許可はサポートされません。
自分または別のユーザーの Microsoft Authenticator Passwordless Phone サインイン認証方法の詳細を取得します。
GET /users/{id | userPrincipalName}/authentication/passwordlessMicrosoftAuthenticatorMethods/{id}
名前 |
説明 |
Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK
応答コードと、要求された passwordlessMicrosoftAuthenticatorAuthenticationMethod オブジェクトを応答本文に返します。
例
要求
GET https://graph.microsoft.com/beta/me/authentication/passwordlessMicrosoftAuthenticatorMethods/R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1
// 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.Me.Authentication.PasswordlessMicrosoftAuthenticatorMethods["{passwordlessMicrosoftAuthenticatorAuthenticationMethod-id}"].GetAsync();
mgc-beta users authentication passwordless-microsoft-authenticator-methods get --user-id {user-id} --passwordless-microsoft-authenticator-authentication-method-id {passwordlessMicrosoftAuthenticatorAuthenticationMethod-id}
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
passwordlessMicrosoftAuthenticatorMethods, err := graphClient.Me().Authentication().PasswordlessMicrosoftAuthenticatorMethods().ByPasswordlessMicrosoftAuthenticatorAuthenticationMethodId("passwordlessMicrosoftAuthenticatorAuthenticationMethod-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
PasswordlessMicrosoftAuthenticatorAuthenticationMethod result = graphClient.me().authentication().passwordlessMicrosoftAuthenticatorMethods().byPasswordlessMicrosoftAuthenticatorAuthenticationMethodId("{passwordlessMicrosoftAuthenticatorAuthenticationMethod-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let passwordlessMicrosoftAuthenticatorAuthenticationMethod = await client.api('/me/authentication/passwordlessMicrosoftAuthenticatorMethods/R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->me()->authentication()->passwordlessMicrosoftAuthenticatorMethods()->byPasswordlessMicrosoftAuthenticatorAuthenticationMethodId('passwordlessMicrosoftAuthenticatorAuthenticationMethod-id')->get()->wait();
Import-Module Microsoft.Graph.Beta.Identity.SignIns
# A UPN can also be used as -UserId.
Get-MgBetaUserAuthenticationPasswordlessMicrosoftAuthenticatorMethod -UserId $userId -PasswordlessMicrosoftAuthenticatorAuthenticationMethodId $passwordlessMicrosoftAuthenticatorAuthenticationMethodId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta 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.me.authentication.passwordless_microsoft_authenticator_methods.by_passwordless_microsoft_authenticator_authentication_method_id('passwordlessMicrosoftAuthenticatorAuthenticationMethod-id').get()
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"value": {
"id": "R18B3t8Ogh9XIOGmPt81d6p_KXJs1YTxfGgGqeVFJSM1",
"displayName": "My mobile phone",
"creationDateTime": "2020-09-02T04:16:49Z"
}
}