# Restore-MgUser not working

**URL:** <https://forums.powershell.org/t/restore-mguser-not-working/19920>\
**Category:** PowerShell Help\
**Created:** [July 19, 2022, 1:15pm UTC](https://forums.powershell.org/t/restore-mguser-not-working/19920 "2022-07-19T13:15:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jday](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jday](https://forums.powershell.org/u/jday)\
**Post date:** [July 19, 2022, 1:15pm UTC](https://forums.powershell.org/t/restore-mguser-not-working/19920/1 "2022-07-19T13:15:15Z")

</div>

I’ve been struggling getting Restore-MgUser to work and wanted to see if anybody had any ideas or suggestions to try. No matter what I pass into the UserId parameter, I always get the same output:

 ![Restore2](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/7/7359efbded110602352e6e8de7eb8b0134840d6b.jpeg)

The API Permissions are Directory.ReadWrite.All, User.ManageIdentities.All, and User.ReadWrite.All.

---

<div class="post-metadata">

**Author:** ![jday](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jday](https://forums.powershell.org/u/jday)\
**Post date:** [July 19, 2022, 1:16pm UTC](https://forums.powershell.org/t/restore-mguser-not-working/19920/2 "2022-07-19T13:16:32Z")

</div>

I also should mention that I know for a fact that this test user is in the deleted items list:

 ![Restore1](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/1/171b9c681903c513326dc192226d8a7436b59efc.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [February 10, 2024, 5:34pm UTC](https://forums.powershell.org/t/restore-mguser-not-working/19920/3 "2024-02-10T17:34:06Z")

</div>

Closed on February 10, 2024, 5:34pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
