A cloud-based identity and access management service for securing user authentication and resource access
Hello Prathyush P V,
Greetings! Thanks for raising this question in Q&A forum.
Based on the behavior you described, this is most likely related to service principal soft deletion and backend replication delays in Microsoft Entra ID. After an Enterprise Application is deleted, some directory references may still exist for a short period, which can cause the initial AADSTS650051 error even though the service principal recreation is already in progress.
- Verify whether the deleted Enterprise Application still appears in the tenant's deleted objects or can be restored through Microsoft Entra ID.
- After deleting an Enterprise Application, avoid immediately triggering the
/adminconsentflow. Allow some time for directory replication to complete. - Implement retry logic with exponential backoff in your application when receiving AADSTS650051 during consent operations.
- Check the Microsoft Entra sign-in and audit logs around the provided Correlation ID and Timestamp to confirm whether the service principal was being recreated when the error occurred.
- If the behavior is consistently reproducible across multiple tenants, collect the Correlation ID, Trace ID, Timestamp, Tenant ID, and Application ID for further investigation.
Since the Enterprise Application is ultimately created and the subsequent /adminconsent attempt succeeds, this points more toward a transient backend consistency issue rather than a permanent configuration problem.
The next action would be to monitor whether the issue occurs consistently and, if it does, a Microsoft support engineer can review the backend logs using the correlation details to determine whether this is expected replication behavior or a product issue.
If this answer helps you kindly accept the answer which will help others who have similar questions
Best Regards,
Jerald Felix.