Onboarding a Microsoft 365 Organization Fails with: service principal name is already present for the tenant

KB ID: 4871
Product: Veeam Data Cloud for Microsoft 365
Published: 2026-06-16
Last Modified: 2026-06-16
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

Challenge

When signing in with a device code during onboarding of a Microsoft 365 organization in Veeam Data Cloud for Microsoft 365, the following error occurs:

AADSTS650051: Consent action for Application '<application-id>' failed due to following error: The <application-id> service principal name is already present for the tenant <tenant-id> paramName: ServicePrincipalName, paramValue: <application-id>, objectType: System.String
Microsoft Sign in page showing the AADSTS650051 error: the service principal name is already present for the tenant.

Cause

This error occurs when a service principal from a previous onboarding attempt is still present in the customer tenant.

Under normal conditions, onboarding proceeds as follows:

  1. The user signs in with a device code, and a new service principal is created in the customer tenant.
  2. When Connect is clicked, the onboarding process uses that service principal to obtain an authentication token, then deletes the service principal and begins onboarding the organization.

However, if an error occurs during organization onboarding (for example, the account does not have sufficient permissions, or an organization with the same domain already exists), onboarding fails after the service principal has been deleted. If a new device code is then generated and used to sign in again too soon, the onboarding process attempts to create a service principal with the same name as the one from the failed attempt. Because service principal deletion is a soft delete that takes approximately 5 to 15 minutes to complete in Azure, the name remains in the tenant even though the Azure portal no longer displays the service principal. As a result, the error occurs.

Solution

If this error occurs, wait approximately 15 minutes for the soft-deleted service principal to be fully removed, then regenerate the device code and sign in again.

Deleting the Enterprise application will not speed up removal of the soft-deleted service principal and should not be performed.

If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.

To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.