[GH-ISSUE #1142] BUG: The service principal cannot be created, updated, or restored because the service principal name is already in use #618

Closed
opened 2026-03-02 12:43:46 +03:00 by kerem · 1 comment
Owner

Originally created by @Nepenthe-x64 on GitHub (Oct 4, 2022).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1142

After clicking the Enable GDAP API button I'm getting the following error:

Failed to add SPN. Please manually execute 'New-AzureADServicePrincipal -AppId ' The error was Insufficient privileges to complete the operation.

When I execute the command in Azure AD PowerShell I get the following message:

New-AzureADServicePrincipal : Error occurred while executing NewServicePrincipal
Code: Request_MultipleObjectsWithSameKeyValue
Message: The service principal cannot be created, updated, or restored because the service principal name
https://api.partnercustomeradministration.microsoft.com is already in use.
RequestId: bf68ceca-bbff-42f9-a80f-e3d46a1c58c9
DateTimeStamp: Tue, 04 Oct 2022 03:44:47 GMT
HttpStatusCode: Conflict
HttpStatusDescription: Conflict
HttpResponseStatus: Completed
At line:1 char:1

  • New-AzureADServicePrincipal -AppId

When I look in Enterprise apps the AppId it lists is tied to an app called Partner Customer Delegated Administration, but I can't update the API permissions per your KB. How do I proceed from here?

Thanks,

Adam

Originally created by @Nepenthe-x64 on GitHub (Oct 4, 2022). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1142 After clicking the Enable GDAP API button I'm getting the following error: Failed to add SPN. Please manually execute 'New-AzureADServicePrincipal -AppId <appID ommited for security>' The error was Insufficient privileges to complete the operation. When I execute the command in Azure AD PowerShell I get the following message: New-AzureADServicePrincipal : Error occurred while executing NewServicePrincipal Code: Request_MultipleObjectsWithSameKeyValue Message: The service principal cannot be created, updated, or restored because the service principal name https://api.partnercustomeradministration.microsoft.com is already in use. RequestId: bf68ceca-bbff-42f9-a80f-e3d46a1c58c9 DateTimeStamp: Tue, 04 Oct 2022 03:44:47 GMT HttpStatusCode: Conflict HttpStatusDescription: Conflict HttpResponseStatus: Completed At line:1 char:1 + New-AzureADServicePrincipal -AppId When I look in Enterprise apps the AppId it lists is tied to an app called Partner Customer Delegated Administration, but I can't update the API permissions per your KB. How do I proceed from here? Thanks, Adam
kerem 2026-03-02 12:43:46 +03:00
Author
Owner

@KelvinTegelaar commented on GitHub (Oct 6, 2022):

Not a bug. Someone already used the GDAP migration tool so you can skip that step.

<!-- gh-comment-id:1269897508 --> @KelvinTegelaar commented on GitHub (Oct 6, 2022): Not a bug. Someone already used the GDAP migration tool so you can skip that step.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#618
No description provided.