Get microsoftAuthenticatorAuthenticationMethod
Article
07/06/2023
6 contributors
Feedback
In this article
Namespace: microsoft.graph
Read the properties and relationships of a microsoftAuthenticatorAuthenticationMethod object.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permissions acting on self
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
UserAuthenticationMethod.Read, UserAuthenticationMethod.ReadWrite
Delegated (personal Microsoft account)
Not supported.
Application
Not supported.
Permissions acting on other users
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
UserAuthenticationMethod.Read.All, UserAuthenticationMethod.ReadWrite.All
For delegated scenarios where an admin is acting on another user, the administrator needs one of the following Azure AD roles .
Global Reader
Authentication Administrator
Privileged Authentication Administrator
HTTP request
Get details of your own Microsoft Authenticator authentication method.
GET /me/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethodId}
Get details of your own or another user's Microsoft Authenticator authentication method.
GET /users/{id | userPrincipalName}/authentication/microsoftAuthenticatorMethods/{microsoftAuthenticatorAuthenticationMethodId}
Optional query parameters
This method supports some of the OData query parameters to help customize the response. For general information, see OData query parameters .
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and a microsoftAuthenticatorAuthenticationMethod object in the response body.
Examples
Request
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
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.Users["{user-id}"].Authentication.MicrosoftAuthenticatorMethods["{microsoftAuthenticatorAuthenticationMethod-id}"].GetAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc users authentication microsoft-authenticator-methods get --user-id {user-id} --microsoft-authenticator-authentication-method-id {microsoftAuthenticatorAuthenticationMethod-id}
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
microsoftAuthenticatorMethods, err := graphClient.Users().ByUserId("user-id").Authentication().MicrosoftAuthenticatorMethods().ByMicrosoftAuthenticatorAuthenticationMethodId("microsoftAuthenticatorAuthenticationMethod-id").Get(context.Background(), nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
MicrosoftAuthenticatorAuthenticationMethod microsoftAuthenticatorAuthenticationMethod = graphClient.users("anirban@contoso.com").authentication().microsoftAuthenticatorMethods("_jpuR-TGZtk6aQCLF3BQjA2")
.buildRequest()
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
let microsoftAuthenticatorAuthenticationMethod = await client.api('/users/anirban@contoso.com/authentication/microsoftAuthenticatorMethods/_jpuR-TGZtk6aQCLF3BQjA2')
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->users()->byUserId('user-id')->authentication()->microsoftAuthenticatorMethods()->byMicrosoftAuthenticatorAuthenticationMethodId('microsoftAuthenticatorAuthenticationMethod-id')->get()->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Import-Module Microsoft.Graph.Identity.SignIns
Get-MgUserAuthenticationMicrosoftAuthenticatorMethod -UserId $userId -MicrosoftAuthenticatorAuthenticationMethodId $microsoftAuthenticatorAuthenticationMethodId
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
result = await graph_client.users.by_user_id('user-id').authentication.microsoft_authenticator_methods.by_microsoft_authenticator_method_id('microsoftAuthenticatorAuthenticationMethod-id').get()
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
Note: The response object shown here might be shortened for readability.
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"
}
}