Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Retrieve creation options required to generate and register a Microsoft Entra ID-compatible passkey. This function returns WebAuthn credential creation options that include a challenge, relying party information, and user information, which are used by the client to create a new FIDO2 credential. The challenge property and credential IDs in excludeCredentials are Base64URL-encoded without padding. All binary data in the response follows Base64URL encoding as defined in RFC 4648 Section 5.
Note
This API applies a system-defined challenge timeout of 5 minutes. Unlike the beta version of this API, custom challenge timeout values are not supported in v1.0.
This API has a known issue that requires Allow self-service setup to be enabled in the FIDO2 authentication method policy.
Permissions
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.
| Permission type | Least privileged permissions | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | UserAuthMethod-Passkey.ReadWrite.All | UserAuthenticationMethod.ReadWrite.All |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | UserAuthMethod-Passkey.ReadWrite.All | UserAuthenticationMethod.ReadWrite.All |
Important
For delegated access using work or school accounts where the signed-in user is acting on another user, they must be assigned a supported Microsoft Entra role or a custom role that grants the permissions required for this operation. This operation supports the following built-in roles, which provide only the least privilege necessary:
- Global Reader
- Authentication Administrator
- Privileged Authentication Administrator
HTTP request
Note
Calling the /me endpoint requires a signed-in user and therefore a delegated permission. Application permissions aren't supported when using the /me endpoint.
GET /users/{id}/authentication/fido2Methods/creationOptions
GET /me/authentication/fido2Methods/creationOptions
Request headers
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Request body
Don't supply a request body for this method.
Response
If successful, this function returns a 200 OK response code and a webauthnCredentialCreationOptions object in the response body.
Examples
Request
The following example shows a request.
GET https://graph.microsoft.com/v1.0/users/99a1915f-70a7-4b67-9dca-64095b41be73/authentication/fido2Methods/creationOptions
Response
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
{
"@odata.type": "#microsoft.graph.webauthnCredentialCreationOptions",
"challengeTimeoutDateTime": "2026-04-20T10:05:00Z",
"publicKey": {
"@odata.type": "#microsoft.graph.webauthnPublicKeyCredentialCreationOptions",
"rp": {
"@odata.type": "#microsoft.graph.webauthnPublicKeyCredentialRpEntity",
"id": "login.microsoftonline.com",
"name": "Microsoft"
},
"user": {
"@odata.type": "#microsoft.graph.webauthnPublicKeyCredentialUserEntity",
"id": "ZGF2aWRAY29udG9zby5jb20",
"displayName": "David Smith",
"name": "david@contoso.com"
},
"challenge": "QTU1MzNDNzAtNkM3Ni00NTRDLUJDQ0YtRTREMDZCNTBFRTRE",
"pubKeyCredParams": [
{
"@odata.type": "#microsoft.graph.webauthnPublicKeyCredentialParameters",
"type": "public-key",
"alg": -7
}
],
"timeout": 60000,
"excludeCredentials": [],
"authenticatorSelection": {
"@odata.type": "#microsoft.graph.webauthnAuthenticatorSelectionCriteria",
"authenticatorAttachment": "platform",
"requireResidentKey": true,
"userVerification": "required"
},
"attestation": "direct",
"extensions": {
"@odata.type": "#microsoft.graph.webauthnAuthenticationExtensionsClientInputs"
}
}
}