Not able to DROP/DELETE AAD SSO Enterprice Application

Harwalkar, Swapnil 0 Reputation points
2025-03-05T15:49:21.7+00:00

I am unable to delete the Application with below command I am able to retrieve the Service_Principal/Object_ID but when i am running the below command not able to delete it.

DELETE_RESPONSE=$(curl -s -S -X DELETE \
  -H "Authorization: Bearer $TOKEN" \
  "https://graph.microsoft.com/v1.0/servicePrincipals/$SP_ID")
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,816 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Akhilesh Vallamkonda 13,065 Reputation points Microsoft External Staff
    2025-03-06T12:40:32.9533333+00:00

    Hi @Harwalkar, Swapnil

    Thank you for reaching Microsoft Q&A!

    I understand that you are trying to delete the Enterprise Application from your tenant.

    To remove the Enterprise Application, you need one of the following roles Cloud Application Administrator, Application Administrator and owner of the service principal.
    use the below Microsoft Graph API to delete application.

    DELETE https://graph.microsoft.com/v1.0/servicePrincipals/{servicePrincipal-id}
    

    Replace the ServicePrinipad-id with Object ID of the application which as shown in the below picture.

    User's image

    Reference: Delete an enterprise application
    Hope this helps. If this is not your query do let us know by responding in the comments section.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.