Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Répertoriez tous les jetons OATH matériels dans le répertoire.
Dans les scénarios délégués avec des comptes professionnels ou scolaires, l’utilisateur connecté doit se voir attribuer un rôle Microsoft Entra pris en charge ou un rôle personnalisé avec une autorisation de rôle prise en charge. Les rôles les moins privilégiés suivants sont pris en charge pour cette opération.
Lecteur général
Administrateur de stratégie d’authentification
Requête HTTP
GET /directory/authenticationMethodDevices/hardwareOathDevices
Paramètres facultatifs de la requête
Cette méthode prend en charge $selectles $filter paramètres de requête OData , (eq) et $top pour vous aider à personnaliser la réponse. Pour des informations générales, consultez paramètres de la requête OData.
GET https://graph.microsoft.com/beta/directory/authenticationMethodDevices/hardwareOathDevices
// 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.Directory.AuthenticationMethodDevices.HardwareOathDevices.GetAsync();
// 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
hardwareOathDevices, err := graphClient.Directory().AuthenticationMethodDevices().HardwareOathDevices().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
HardwareOathTokenAuthenticationMethodDeviceCollectionResponse result = graphClient.directory().authenticationMethodDevices().hardwareOathDevices().get();
# 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.directory.authentication_method_devices.hardware_oath_devices.get()
GET https://graph.microsoft.com/beta/directory/authenticationMethodDevices/hardwareOathDevices?$filter=status eq 'activated'
// 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.Directory.AuthenticationMethodDevices.HardwareOathDevices.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "status eq 'activated'";
});
// 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"
graphdirectory "github.com/microsoftgraph/msgraph-beta-sdk-go/directory"
//other-imports
)
requestFilter := "status eq 'activated'"
requestParameters := &graphdirectory.AuthenticationMethodDevicesHardwareOathDevicesRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphdirectory.AuthenticationMethodDevicesHardwareOathDevicesRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
hardwareOathDevices, err := graphClient.Directory().AuthenticationMethodDevices().HardwareOathDevices().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
HardwareOathTokenAuthenticationMethodDeviceCollectionResponse result = graphClient.directory().authenticationMethodDevices().hardwareOathDevices().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "status eq 'activated'";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.directory.authentication_method_devices.hardware_oath_devices.hardware_oath_devices_request_builder import HardwareOathDevicesRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = HardwareOathDevicesRequestBuilder.HardwareOathDevicesRequestBuilderGetQueryParameters(
filter = "status eq 'activated'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.directory.authentication_method_devices.hardware_oath_devices.get(request_configuration = request_configuration)
GET https://graph.microsoft.com/beta/directory/authenticationMethodDevices/hardwareOathDevices?$filter=serialNumber eq 'TOTP123456'
// 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.Directory.AuthenticationMethodDevices.HardwareOathDevices.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "serialNumber eq 'TOTP123456'";
});
// 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"
graphdirectory "github.com/microsoftgraph/msgraph-beta-sdk-go/directory"
//other-imports
)
requestFilter := "serialNumber eq 'TOTP123456'"
requestParameters := &graphdirectory.AuthenticationMethodDevicesHardwareOathDevicesRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphdirectory.AuthenticationMethodDevicesHardwareOathDevicesRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
hardwareOathDevices, err := graphClient.Directory().AuthenticationMethodDevices().HardwareOathDevices().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
HardwareOathTokenAuthenticationMethodDeviceCollectionResponse result = graphClient.directory().authenticationMethodDevices().hardwareOathDevices().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "serialNumber eq 'TOTP123456'";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.directory.authentication_method_devices.hardware_oath_devices.hardware_oath_devices_request_builder import HardwareOathDevicesRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = HardwareOathDevicesRequestBuilder.HardwareOathDevicesRequestBuilderGetQueryParameters(
filter = "serialNumber eq 'TOTP123456'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.directory.authentication_method_devices.hardware_oath_devices.get(request_configuration = request_configuration)