Cross-tenant mailbox migration PS script error

Mikayel Mikayelyan 61 Reputation points
2022-03-09T18:34:48.013+00:00

Greetings I am currently preparing target tenant using the guide https://learn.microsoft.com/en-us/microsoft-365/enterprise/cross-tenant-mailbox-migration?view=o365-worldwide

I have reached the part where it says "Create a new migration endpoint for cross-tenant mailbox moves"

I am connected to target tenant via PowerShell remote connection and once running this script (of course all replacements done in string) :

Enable customization if tenant is dehydrated

$dehydrated=Get-OrganizationConfig | fl isdehydrated
if ($dehy -eq $true) {Enable-OrganizationCustomization}

$AppId = "[guid copied from the migrations app]"

$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $AppId, (ConvertTo-SecureString -String "[this is your secret password you saved in the previous steps]" -AsPlainText -Force)

New-MigrationEndpoint -RemoteServer outlook.office.com -RemoteTenant "sourcetenant.onmicrosoft.com" -Credentials $Credential -ExchangeRemoteMove:$true -Name "[the name of your migration endpoint]" -ApplicationId $AppId

I am getting this error :

"Error finding certificate '' from azure key vault for tenant 'e5fcd875-c784-4c8a-9919-6c4e2fb0c40e'.
+ CategoryInfo : NotSpecified: (:) [New-MigrationEndpoint], KeyVaultFailureErrorException
+ FullyQualifiedErrorId : [Server=CY4PR12MB1927,RequestId=34a77109-32b0-4500-b929-9bdcfc24e8d3,TimeStamp=3/9/2022
6:26:22 PM] [FailureCategory=Cmdlet-KeyVaultFailureErrorException] AE8FE1BA,Microsoft.Exchange.Management.Migratio
n.MigrationService.Endpoint.NewMigrationEndpoint
+ PSComputerName : outlook.office365.com"

From what I have read in the beginning of guide this new method does not requires certificate in vault but I am getting error related to that.

Can someone please help me with this?

Regards

Mikayel

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,542 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Mikayel Mikayelyan 61 Reputation points
    2022-03-10T08:36:01.737+00:00

    Hi @Joyce Shen - MSFT Thanks for the answer
    I have solve the issue, Thanks for the answers. The problem were in command string I forgot to remove [ ] :-)

    1 person found this answer helpful.

  2. Mikayel Mikayelyan 61 Reputation points
    2022-03-10T13:51:44.143+00:00

    Hi I have one more question can someone help me wit this section
    https://learn.microsoft.com/en-us/microsoft-365/enterprise/cross-tenant-mailbox-migration?view=o365-worldwide#prerequisites-for-target-user-objects

    I can't find mailbox object attribute details in Exchange online both organizations fully cloud no on premise.
    Thanks


  3. Mikayel Mikayelyan 61 Reputation points
    2022-03-11T12:50:26.63+00:00

    Thanks for answer already found them :-)

    0 comments No comments

  4. Joyce Shen - MSFT 16,666 Reputation points
    2022-03-14T08:16:53.29+00:00

    Hi @Mikayel Mikayelyan

    Thanks for your feedback above which shared more information and glad to know that your issue is resolved now! Since our forum has the policy that The question author cannot accept their own answer. They can only accept answers by others, and according to the scenario introduced here: Answering your own questions on Microsoft Q&A

    I would make a brief summary of this post so that other forum members could easily find useful information here:

    [Cross-tenant mailbox migration PS script error - Summary]

    Issue Symptom:
    When perform Cross-tenant mailbox migration, getting this error :
    "Error finding certificate'' from azure key vault for tenant 'XXX'

    • CategoryInfo : NotSpecified: (:) [New-MigrationEndpoint], KeyVaultFailureErrorException
    • FullyQualifiedErrorId : [Server=XXX,RequestId=XXX,TimeStamp=XXX] [FailureCategory=Cmdlet-KeyVaultFailureErrorException] AE8FE1BA,Microsoft.Exchange.Management.Migratio
      n.MigrationService.Endpoint.NewMigrationEndpoint
    • PSComputerName : outlook.office365.com"

    Solution:
    We will need to remove "[]" in the script

    Reference Links:
    Cross-tenant mailbox migration (preview)

    You could "Accept Answer" for this summary to close this thread, and your action would be helpful to other users who encounter the same issue and read this thread. Thanks for your understanding!


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

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.