| title | fido2AuthenticationMethod: creationOptions |
|---|---|
| description | Retrieve creation options required to generate and register an Entra ID compatible passkey. |
| ms.localizationpriority | medium |
| author | tilarso |
| ms.reviewer | intelligentaccesspm |
| ms.subservice | entra-sign-in |
| doc_type | apiPageType |
| ms.date | 08/14/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Retrieve creation options required to generate and register a Microsoft Entra ID-compatible passkey. Self-service operations aren't supported.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
[!INCLUDE rbac-authentication-methods-apis-write-others]
GET /users/{user-id}/authentication/fido2Methods/creationOptions(challengeTimeoutInMinutes={challengeTimeoutInMinutes})The following table lists the parameters that are required when you call this function.
| Parameter | Type | Description |
|---|---|---|
| challengeTimeoutInMinutes | Int32 | Override the timeout of the server-generated challenge returned in the request. The default value is 5 minutes; this value can be overridden to between 5 - 43200 minutes. |
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this function returns a 200 OK response code and a webauthnCredentialCreationOptions in the response body.
Note
This method also returns excludeCredentials key IDs formatted in Base64URL with a padding number suffix. To decode the key IDs, convert the trailing integer value of 0, 1, or 2 to the same number of base64 padding characters.
The following example shows a request.
GET https://graph.microsoft.com/beta/users/{usersId}/authentication/fido2Methods/creationOptions(challengeTimeoutInMinutes=10)
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.webauthnCredentialCreationOptions",
"challengeTimeoutDateTime": "2024-08-14T16:29:58Z",
"publicKey": {
"challenge": "ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQzB5TlRZaUxDSmxibU1pT2lKQk1qVTJSME5OSWl3aWVEVmpJanBiSWsxSlNVUmhSRU5EUVd4...",
"timeout": 0,
"attestation": "direct",
"rp": {
"id": "login.microsoft.com",
"name": "Microsoft"
},
"user": {
"id": "T0Y6Ehqp2EfQP0iExdt54DFwdWuaH7qIZbZGpOc92RGnvbXyRPvU-8AOp9r1T7Cebfc3",
"displayName": "Kim User",
"name": "kimuser@contoso.com"
},
"pubKeyCredParams": [
{
"type": "public-key",
"alg": -7
},
{
"type": "public-key",
"alg": -257
}
],
"excludeCredentials": [
{
"id": "0S64X8KwFmCeJjHzK1oE/39T+JYhfYbhFurwOxMMjtvRWc/sLYq8AMJVuva823XQ",
"type": "public-key",
"transports": []
},
{
"id": "pgIfj2fnom8rJdb4/h1gKqDkq+gxHFksI+m2aR5T+PNNycBfENAM4ksEBvoXky6d",
"type": "public-key",
"transports": []
},
{
"id": "u5wuw6SGH0VhAz7OXCLRkCuxhm4UrCB7hcLccyMU6calP1hWexfKe5PJNM69neAM",
"type": "public-key",
"transports": []
},
{
"id": "6rc0zTSz2YRlaKlCjqxsNDjDe8qY8TSL95Z4WhxEaaP4XfvfSnAGMk49RSwm/uAO",
"type": "public-key",
"transports": []
}
],
"authenticatorSelection": {
"authenticatorAttachment": "cross-platform",
"requireResidentKey": true,
"userVerification": "required"
},
"extensions": {
"hmacCreateSecret": true,
"enforceCredentialProtectionPolicy": true,
"credentialProtectionPolicy": "userVerificationOptional"
}
}
}
}