ISSUE: Another Object with the same value exist
Last modified:
Overview
"Create O365 user" step for leavers migration may fail with the following error:
2023-09-22T07:14:26|ERROR|Contonso|192.168.140.254|T:60 |GraphExecutionBase`2 |LEAVER_User.surname@Contonso.onmicrosoft.com ||5525 |43e28db7-2e58-4709-b4d1-e285aac44bdc| ||Error Code: Request_BadRequest
2023-09-22T07:14:26|ERROR|Contonso|192.168.140.254|T:60 |GraphExecutionBase`2 |LEAVER_User.surname@Contonso.onmicrosoft.com ||5525 |43e28db7-2e58-4709-b4d1-e285aac44bdc| ||Error Message: Another object with the same value for property userPrincipalName already exists.
2023-09-22T07:14:26|ERROR|Contonso|192.168.140.254|T:64 |GraphExecutionBase`2 |LEAVER_User.surname@Contonso.onmicrosoft.com ||5441 |46abfbf0-076e-4758-b546-381b3f515ab4| ||An error occurred for O365_CreateO365User_WithGraph - LEAVER_user.surname@contonso.onmicrosoft.com/5441
EXCEPTION: Microsoft.Graph.Models.ODataErrors.ODataError: Exception of type 'Microsoft.Graph.Models.ODataErrors.ODataError' was thrown.
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
Cause
Leaver with same name exist in customer AAD or has been created in previous migration run.
Solution
1. If the Leaver was created a s apart of the migration and it's confirmed it's correct user step can be skipped
OR
2. If the leaver was not created by migration but already exist then the Leaver Constructed UPN need to be change for the leaver in the database table "dbo.LeaverMappingselection" and leaver migration need to be restarted.