Microsoft 365


Active Directory


Windows Server


Chance to win $250 in Petri 2023 Audience Survey


Identity Service

Microsoft 365 Changelog

M365 Changelog: Identity Service: Upcoming feature to recover accidentally deleted service principal objects

Rabia Noureen


MC344406 – Microsoft Graph API will soon start supporting the ability to recover accidentally deleted service principal objects. The application object already supports this ability. The update will make the recovery story better for managing the life cycle of applications in your tenant.
When this will happen: Microsoft expects to begin rolling out in early April and expect to complete rollout by late May.

How this will affect your organization: You should be aware of this upcoming release and assess how this may affect your existing scripts and workflows. Expect the following changes to occur after this update:

  • Anytime you delete a service principal through any of the following supported experiences, it will be soft-deleted and hence can be recovered.
  • Soft-deleted service principal objects go into the deleted items container and remain available to restore for up to 30 days. After 30 days, they’re permanently deleted, and this frees up the quota.
  • Soft-deleted service principals can be listed using the List deleted items method for Microsoft Graph API or using Get-AzureADMSDeletedDirectoryObject PowerShell cmdlet.
  • Soft deleted service principals can be permanently deleted using the Permanently delete item method for Microsoft Graph API or Remove-AzureADMSDeletedDirectoryObject PowerShell cmdlet.

Note: A non-admin user can create no more than 250 Azure AD resources that include applications and service principals. Both active resources and deleted resources that are available to restore count toward this quota.
The quota limit already stated is applicable when creating applications or service principals using a delegated flow such as using Azure AD app registrations or Enterprise apps portal. Interacting with the Microsoft Graph API programmatically using application flow won’t have this restriction.

What you need to do to prepare: Notify your users about this change and update your training and documentation as appropriate. If you have any clean-up scripts that permanently delete applications that free up the quota, update such scripts to include service principals as well.
For users who repeatedly exceed the quota in the course of their regular duties, they can permanently delete the resources they no longer need by using the information provided in the previous sections.
Learn more:

Article saved!

Access saved content from your profile page. View Saved