Skip to content

Commit e27025e

Browse files
authored
Merge pull request #25577 from microsoftgraph/luc-hw-oath-refresh
Luc hw oath refresh
2 parents 97bfae1 + 4da0e61 commit e27025e

File tree

48 files changed

+2542
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2542
-4
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: "Delete hardwareOathAuthenticationMethod"
3+
description: "Unassign a hardware token from a user. The token remains in the directory."
4+
author: "luc-msft"
5+
ms.localizationpriority: medium
6+
ms.subservice: "entra-sign-in"
7+
doc_type: apiPageType
8+
ms.date: 12/06/2024
9+
---
10+
11+
# Delete hardwareOathAuthenticationMethod
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Unassign a [hardware token](../resources/hardwareoathauthenticationmethod.md) from a user. The token remains in the directory and its details can be retrieved by [List hardwareOathDevices](authenticationmethoddevice-list-hardwareoathdevices.md) API.
18+
19+
## Permissions
20+
21+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
22+
23+
### Permissions acting on self
24+
<!-- {
25+
"blockType": "permissions",
26+
"name": "authentication-delete-hardwareoathmethods-permissions"
27+
}
28+
-->
29+
<!-- {
30+
"blockType": "permissions",
31+
"name": "authentication-delete-hardwareoathmethods-permissions"
32+
}
33+
-->
34+
[!INCLUDE [permissions-table](../includes/permissions/authentication-delete-hardwareoathmethods-permissions.md)]
35+
36+
## Permissions acting on other users
37+
<!-- {
38+
"blockType": "permissions",
39+
"name": "authentication-delete-hardwareoathmethods-2-permissions"
40+
}
41+
-->
42+
[!INCLUDE [permissions-table](../includes/permissions/authentication-delete-hardwareoathmethods-2-permissions.md)]
43+
44+
## HTTP request
45+
46+
Unassign yourself a hardware OATH authentication method.
47+
<!-- {
48+
"blockType": "ignored"
49+
}
50+
-->
51+
``` http
52+
DELETE /me/authentication/hardwareOathMethods/{hardwareOathAuthenticationMethodId}
53+
```
54+
55+
Unassign another user their hardware OATH authentication method.
56+
<!-- {
57+
"blockType": "ignored"
58+
}
59+
-->
60+
``` http
61+
DELETE /users/{usersId}/authentication/hardwareOathMethods/{hardwareOathAuthenticationMethodId}
62+
```
63+
64+
## Request headers
65+
66+
|Name|Description|
67+
|:---|:---|
68+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
69+
70+
## Request body
71+
72+
Don't supply a request body for this method.
73+
74+
## Response
75+
76+
If successful, this method returns a `204 No Content` response code.
77+
78+
## Examples
79+
80+
### Request
81+
82+
The following example shows a request.
83+
<!-- {
84+
"blockType": "request",
85+
"name": "delete_hardwareoathauthenticationmethod"
86+
}
87+
-->
88+
``` http
89+
DELETE https://graph.microsoft.com/beta/me/authentication/hardwareOathMethods/{hardwareOathAuthenticationMethodId}
90+
```
91+
92+
93+
### Response
94+
95+
The following example shows the response.
96+
<!-- {
97+
"blockType": "response",
98+
"truncated": true
99+
}
100+
-->
101+
``` http
102+
HTTP/1.1 204 No Content
103+
```
104+
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
title: "List hardwareOathAuthenticationMethod objects"
3+
description: "List all hardware tokens assigned to a user"
4+
author: "luc-msft"
5+
ms.localizationpriority: medium
6+
ms.subservice: "entra-sign-in"
7+
doc_type: apiPageType
8+
ms.date: 12/06/2024
9+
---
10+
11+
# List hardwareOathAuthenticationMethod objects
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Get a list of the [hardware tokens](../resources/hardwareoathauthenticationmethod.md) assigned to a [user](../resources/user.md).
18+
19+
## Permissions
20+
21+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
22+
23+
### Permissions acting on self
24+
<!-- {
25+
"blockType": "permissions",
26+
"name": "authentication-list-hardwareoathmethods-permissions"
27+
}
28+
-->
29+
[!INCLUDE [permissions-table](../includes/permissions/authentication-list-hardwareoathmethods-permissions.md)]
30+
31+
### Permissions acting on other users
32+
<!-- {
33+
"blockType": "permissions",
34+
"name": "authentication-list-hardwareoathmethods-2-permissions"
35+
}
36+
-->
37+
[!INCLUDE [permissions-table](../includes/permissions/authentication-list-hardwareoathmethods-2-permissions.md)]
38+
39+
## HTTP request
40+
Get details of your own hardware OATH methods.
41+
<!-- {
42+
"blockType": "ignored"
43+
}
44+
-->
45+
``` http
46+
GET /me/authentication/hardwareOathMethods
47+
```
48+
49+
Get details of another user's hardware OATH methods.
50+
<!-- {
51+
"blockType": "ignored"
52+
}
53+
-->
54+
``` http
55+
GET /users/{usersId}/authentication/hardwareOathMethods
56+
```
57+
58+
## Optional query parameters
59+
60+
This method supports the `$select`, `$filter` and `$top` OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters).
61+
62+
## Request headers
63+
64+
|Name|Description|
65+
|:---|:---|
66+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
67+
68+
## Request body
69+
70+
Don't supply a request body for this method.
71+
72+
## Response
73+
74+
If successful, this method returns a `200 OK` response code and a collection of [hardwareOathAuthenticationMethod](../resources/hardwareoathauthenticationmethod.md) objects in the response body.
75+
76+
## Examples
77+
78+
### Request
79+
80+
The following example shows a request to retrieve the hardware tokens for the signed-in user.
81+
<!-- {
82+
"blockType": "request",
83+
"name": "list_hardwareoathauthenticationmethod"
84+
}
85+
-->
86+
``` http
87+
GET https://graph.microsoft.com/beta/me/authentication/hardwareOathMethods
88+
```
89+
90+
91+
### Response
92+
93+
The following example shows the response.
94+
>**Note:** The response object shown here might be shortened for readability.
95+
<!-- {
96+
"blockType": "response",
97+
"truncated": true,
98+
"@odata.type": "microsoft.graph.hardwareOathAuthenticationMethod"
99+
}
100+
-->
101+
``` http
102+
HTTP/1.1 200 OK
103+
Content-Type: application/json
104+
105+
{
106+
"value": [
107+
{
108+
"@odata.type": "#microsoft.graph.hardwareOathAuthenticationMethod",
109+
"id": "aad49556-####-####-####-############",
110+
"device": {
111+
"id": "aad49556-####-####-####-############",
112+
"displayName": "Amy Masters Token 1",
113+
"serialNumber": "TOTP123456",
114+
"manufacturer": "Contoso",
115+
"model": "Hardware Token 1000",
116+
"secretKey": null,
117+
"timeIntervalInSeconds": 30,
118+
"status": "activated",
119+
"hashFunction": "hmacsha1",
120+
"assignedTo": {
121+
"id": "0cadbf92-####-####-####-############",
122+
"displayName": "Amy Masters"
123+
}
124+
}
125+
},
126+
{
127+
"@odata.type": "#microsoft.graph.hardwareOathAuthenticationMethod",
128+
"id": "3dee0e53-####-####-####-############",
129+
"device": {
130+
"id": "3dee0e53-####-####-####-############",
131+
"displayName": "Amy Masters Token 2",
132+
"serialNumber": "TOTP654321",
133+
"manufacturer": "Contoso",
134+
"model": "Hardware Token 1000",
135+
"secretKey": null,
136+
"timeIntervalInSeconds": 30,
137+
"status": "activated",
138+
"hashFunction": "hmacsha1",
139+
"assignedTo": {
140+
"id": "0cadbf92-####-####-####-############",
141+
"displayName": "Amy Masters"
142+
}
143+
}
144+
}
145+
]
146+
}
147+
```
148+
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: "Create hardwareOathAuthenticationMethod"
3+
description: "Assign a hardware token to a user without activation."
4+
author: "luc-msft"
5+
ms.localizationpriority: medium
6+
ms.subservice: "entra-sign-in"
7+
doc_type: apiPageType
8+
ms.date: 12/06/2024
9+
---
10+
11+
# Create hardwareOathAuthenticationMethod
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Assign a [hardware token](../resources/hardwareoathauthenticationmethod.md) to a user without activation. To activate, use the [activation](hardwareoathauthenticationmethod-activate.md) API operation.
18+
19+
## Permissions
20+
21+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
22+
23+
## Permissions acting on self
24+
<!-- {
25+
"blockType": "permissions",
26+
"name": "authentication-post-hardwareoathmethods-permissions"
27+
}
28+
-->
29+
[!INCLUDE [permissions-table](../includes/permissions/authentication-post-hardwareoathmethods-permissions.md)]
30+
31+
## Permissions acting on other users
32+
<!-- {
33+
"blockType": "permissions",
34+
"name": "authentication-post-hardwareoathmethods-2-permissions"
35+
}
36+
-->
37+
[!INCLUDE [permissions-table](../includes/permissions/authentication-post-hardwareoathmethods-2-permissions.md)]
38+
39+
## HTTP request
40+
Assign a hardware OATH authentication method to yourself.
41+
<!-- {
42+
"blockType": "ignored"
43+
}
44+
-->
45+
``` http
46+
POST /me/authentication/hardwareOathMethods
47+
```
48+
49+
Assign a hardware OATH authentication method to another user.
50+
<!-- {
51+
"blockType": "ignored"
52+
}
53+
-->
54+
``` http
55+
POST /users/{usersId}/authentication/hardwareOathMethods
56+
```
57+
58+
## Request headers
59+
60+
|Name|Description|
61+
|:---|:---|
62+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
63+
|Content-Type|application/json. Required.|
64+
65+
## Request body
66+
67+
In the request body, supply a JSON representation of the [hardwareOathAuthenticationMethod](../resources/hardwareoathauthenticationmethod.md) object.
68+
69+
You can specify the following properties when creating a **hardwareOathAuthenticationMethod**.
70+
71+
|Property|Type|Description|
72+
|:---|:---|:---|
73+
|id|String|ID of the hardware token that is to be assigned to the user and activated.|
74+
75+
## Response
76+
77+
If successful, this method returns a `201 Created` response code and a [hardwareOathAuthenticationMethod](../resources/hardwareoathauthenticationmethod.md) object in the response body.
78+
79+
## Examples
80+
81+
### Request
82+
83+
The following example shows a request.
84+
<!-- {
85+
"blockType": "request",
86+
"name": "create_hardwareoathauthenticationmethod_from_"
87+
}
88+
-->
89+
``` http
90+
POST https://graph.microsoft.com/beta/me/authentication/hardwareOathMethods
91+
Content-Type: application/json
92+
93+
{
94+
"device": {
95+
"id": "aad49556-####-####-####-############"
96+
},
97+
}
98+
```
99+
100+
101+
### Response
102+
103+
The following example shows the response.
104+
>**Note:** The response object shown here might be shortened for readability.
105+
<!-- {
106+
"blockType": "response",
107+
"truncated": true,
108+
"@odata.type": "microsoft.graph.hardwareOathAuthenticationMethod"
109+
}
110+
-->
111+
``` http
112+
HTTP/1.1 201 Created
113+
Content-Type: application/json
114+
115+
{
116+
"@odata.type": "#microsoft.graph.hardwareOathAuthenticationMethod",
117+
"id": "658d0bfe-3cb9-d4d3-5296-147bc3b1f130",
118+
"createdDateTime": "String (timestamp)"
119+
}
120+
```
121+

0 commit comments

Comments
 (0)