I have hard Deleted a user form Entra ID and they will not get recreated with Auto provisioning

Steve 5 Reputation points
2023-12-05T19:36:02.1366667+00:00

So I had a user that had created an account before we setup Entra ID. I have set up auto user provisioning with Google Workspace to Entra ID and this works. By adding a user to a Group in Google Workspace they are Auto provisioned in Entra ID. So I was haivng issues with one user account in Entra ID so I hard deleted it and then i was hoping that auto provision would recreate to user again in Entra ID. Problem is that I am getting no error and the user is not being created. Any idea where to look to see what the issue is?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} vote

2 answers

Sort by: Most helpful
  1. Lars 5 Reputation points
    2025-05-07T09:30:43.04+00:00

    Today I had the same issue as described above by Steve.

    • The user provisioned from Google Workspace to EntraID was deleted in EntraID. After the redemption period it was deleted permanently, so not recoverable.
    • Syncing this user freshly from Google Workspace wasn't working as I got the error '45010, Please restore this deleted user from Office 365 Admin Console.' However this user was not recoverable.
    • Creating a new user in EntraID was not possible as you can't create new users with a domain that is federated.

    What worked for me:

    • Create a new user to replace the deleted user in EntraID that will use the UPN 'onmicrosoft.com' domain.
    • Change the UPN and UnmuttableID using the Microsoft Graph Powershell Module to the federated domain.
      • Connect-MgGraph -Scopes "User.ReadWrite.All", "Group.ReadWrite.All"
      • Update-MgUser -UserId '<username>@<domain>.onmicrosoft.com' -UserPrincipalName '<username>@<federateddomain.com>' -OnPremisesImmutableId '<username>@<federateddomain.com>'
      E.g. if your Google Workspace domain is: 'contoso.com' you will create a new user in EntraID '@contoso.onmicrosoft.com' and use PowerShell to rename it to '@contoso.com' and set the ImmutableID.
    • After creating the user and setting the Immutable ID run the Sync in Google Workspace to sync the users. You see now that the other user properties like name etc. are synced.
    • After that I could login again on office.com using the Google Workspace account.
    1 person found this answer helpful.

  2. Thameur-BOURBITA 36,261 Reputation points Moderator
    2023-12-05T21:00:33.75+00:00

    Hi @Steve

    You should start by checking if all prerequisites mentioned on the article below are configured :

    Tutorial: Configure G Suite for automatic user provisioning


    Please don't forget to accept helpful answer


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.