Unable to enable Office 365 Management APIs to Enabled for users to sign-in

Matthew Scott 20 Reputation points
2025-03-02T19:24:41.3+00:00

We are trying to configure an App Registration that leverages the Office 365 Management APIs that is able to obtain use due to the Office 365 Management API being set to "No" for Enabled for users to sign-in. When we attempt to enable in the Azure/Entra portal we simply receive the following

"Failed to update Office 365 Management APIs. Error detail: Unable to complete the request due to data validation error."

When attempting to perform via azure command "az adp sp update" this refers to a conflicting ServicePrincipalName

ERROR: Another object with the same value for property servicePrincipalNames already exists.

{"error":{"code":"Request_BadRequest","message":"Another object with the same value for property servicePrincipalNames already 
exists.","details":[{"code":"ObjectConflict","message":"Another object with the same value for property servicePrincipalNames already 
exists.","target":"servicePrincipalNames","blockedWord":"","prefix":"","suffix":""},{"code":"ConflictingObjects","message":"Another object with the same 
value for property servicePrincipalNames already exists.","target":"ServicePrincipal_XXXXXXXXXXXXXXXXXX","blockedWord":"","prefix":"","
suffix":""}],"innerError":{"date":"2025-03-02T19:17:43","request-id":"4b8f18eb-3bc5-4e63-8b04-c877145c18d3","client-request-id":"4b8f18eb-3bc5-4e63-8b04-
c877145c18d3"}}}

This refers to another ServicePrincipal of Office 365 Exchange Online

I have reviewed the ServicePrincipal names for both of these and do not see any overlap. As well, extended this to ALL SPs and unable to locate any overlap.

I have attempted to open a support case with Microsoft Support, but haven't been able to gain any traction as they immediately classify this as "developer" related support which is not part of our support agreement.

Any assistance on this would be greatly appreciated.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,697 questions
0 comments No comments
{count} votes

Accepted answer
  1. Kancharla Saiteja 1,655 Reputation points Microsoft External Staff
    2025-03-04T07:14:18.85+00:00

    Hi Matthew Scott,

    Thank you for posting your query on Microsoft Q&A.

    Based on your query, I understand that you have an issue with Office365 management API.

    As you have mentioned this issue has been occurred due to Office 365 exchange online. This has been identified previously in some of the tenants as they both work on the same resources.

    In order to overcome this issue, please follow the below steps.

    Install and run Az resources module to your PowerShell as admin:

    # Install Az version 3.6.1

    Install-Module -Name Az -RequiredVersion 3.6.1

    # Load Az version 3.6.1

    Import-Module -Name Az -RequiredVersion 3.6.1

    $sp = Get-AzureADServicePrincipal -Filter "AppId eq '00000002-0000-0ff1-ce00-000000000000'"

    $sp.ServicePrincipalNames

    $spn = $sp.ServicePrincipalNames | Where-Object { $_ –ne "https://manage.protection.apps.mil" }

    $spn

    Set-AzureADServicePrincipal -ObjectId $sp.ObjectId -ServicePrincipalNames $spn

    New-AzureADServicePrincipal -AppId “AppId”

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

    If the answer is helpful, please click "Accept Answer" and kindly "upvote it". If you have extra questions about this answer, please click "Comment"

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.