Skip to content

Commit 5dbb4c2

Browse files
authored
Merge pull request #25694 from microsoftgraph/maheshwaria/restoreUser
Introducing an optional parameter to RestoreUser service actions
2 parents eb3b061 + 0efb5a3 commit 5dbb4c2

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

api-reference/beta/api/directory-deleteditems-restore.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ The following table lists the parameters that are required when you call this ac
7070
|Parameter|Type|Description|
7171
|:---|:---|:---|
7272
|autoReconcileProxyConflict|Boolean|Optional parameter. Indicates whether Microsoft Entra ID should remove any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. Used only for restoring soft-deleted [user](../resources/user.md). The default value for this paramater is `false`.|
73+
|newUserPrincipalName|String|The new **userPrincipalName** to add to the restored [user](../resources/user.md). Optional.|
7374

7475
## Response
7576

@@ -239,4 +240,44 @@ Content-type: application/json
239240
}
240241
```
241242

243+
### Request
244+
245+
<!-- {
246+
"blockType": "request",
247+
"name": "restore_directory_deleteditem_newUserPrincipalName"
248+
}-->
249+
```http
250+
POST https://graph.microsoft.com/beta/directory/deleteditems/78bf875b-9343-4edc-9130-0d3958113563/restore
251+
Content-Type: application/json
252+
253+
{
254+
"newUserPrincipalName": "johndoe@contoso.com"
255+
}
256+
```
257+
258+
### Response
259+
> **Note:** The response object shown here might be shortened for readability.
260+
<!-- {
261+
"blockType": "response",
262+
"truncated": true,
263+
"@odata.type": "microsoft.graph.directoryObject"
264+
} -->
265+
```http
266+
HTTP/1.1 200 OK
267+
Content-type: application/json
268+
269+
{
270+
"@odata.context": "https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity",
271+
"@odata.type": "#microsoft.graph.user",
272+
"id": "78bf875b-9343-4edc-9130-0d3958113563",
273+
"businessPhones": [],
274+
"displayName": "SampleUser",
275+
"givenName": "Sample",
276+
"mobilePhone": "+1 425 555 0109",
277+
"officeLocation": "18/2111",
278+
"preferredLanguage": "en-US",
279+
"surname": "Vance",
280+
"userPrincipalName": "johndoe@contoso.com"
281+
}
282+
```
242283

changelog/Microsoft.DirectoryServices.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13889,7 +13889,33 @@
1388913889
"CreatedDateTime": "2024-10-09T23:15:04.1920065Z",
1389013890
"WorkloadArea": "Identity and access",
1389113891
"SubArea": "Directory management"
13892-
}
13892+
},
13893+
{
13894+
"ChangeList": [
13895+
{
13896+
"Id": "8cd03a79-71de-467d-bd73-0b3449a28bfc",
13897+
"ApiChange": "Method",
13898+
"ChangedApiName": "restore",
13899+
"ChangeType": "Deletion",
13900+
"Description": "Removed the **restore** method from the [directoryObject](https://learn.microsoft.com/en-us/graph/api/resources/directoryObject?view=graph-rest-beta) resource.",
13901+
"Target": "directoryObject"
13902+
},
13903+
{
13904+
"Id": "8cd03a79-71de-467d-bd73-0b3449a28bfc",
13905+
"ApiChange": "Method",
13906+
"ChangedApiName": "restore",
13907+
"ChangeType": "Addition",
13908+
"Description": "Added the [restore](https://learn.microsoft.com/en-us/graph/api/directory-deleteditems-restore?view=graph-rest-beta) method to the [directoryObject](https://learn.microsoft.com/en-us/graph/api/resources/directoryObject?view=graph-rest-beta) resource.",
13909+
"Target": "directoryObject"
13910+
}
13911+
],
13912+
"Id": "8cd03a79-71de-467d-bd73-0b3449a28bfc",
13913+
"Cloud": "Prod",
13914+
"Version": "beta",
13915+
"CreatedDateTime": "2024-12-17T00:35:00.3307839Z",
13916+
"WorkloadArea": "Identity and access",
13917+
"SubArea": "Directory management"
13918+
}
1389313919
]
1389413920
}
1389513921

concepts/whats-new-overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Use the new restore bulk addition request API for more convenient, efficient, an
4949
- Deprecated the **crossRegionDisasterRecoveryEnabled** property of the [cloudPcCrossRegionDisasterRecoverySetting](/graph/api/resources/cloudpccrossregiondisasterrecoverysetting?view=graph-rest-beta&preserve-view=true) resource. Going forward use the **disasterRecoveryType** property.
5050
- Enabled `endpointConnectivityCheckVMAgentEndPointCommunicationError` as a supported error type in the **errorType** property of the [cloudPcOnPremisesConnectionHealthCheck](/graph/api/resources/cloudpconpremisesconnectionhealthcheck?view=graph-rest-beta&preserve-view=true) resource.
5151

52+
### Identity and access | Directory management
53+
54+
While [restoring soft-deleted users](/graph/api/directory-deleteditems-restore?view=graph-rest-beta&preserve-view=true), you can now specify whether Microsoft Entra ID should replace the user's **userPrincipalName** with a new value.
55+
5256
### Reports | Microsoft 365 monitoring reports
5357

5458
The Microsoft 365 monitoring APIs provide telemetry data to monitor the health of various Microsoft services within a Microsoft 365 subscription for your organization. Use the new operations in the [serviceActivity](/graph/api/resources/serviceactivity?view=graph-rest-beta&preserve-view=true) resource to get telemetry data for Exchange Online, Microsoft 365 Apps, and Microsoft Teams.

0 commit comments

Comments
 (0)