Additional SQL Server features and topics not covered by specific categories
As this question is difficult to answer without knowledge about Dynamics, I would recommend you to seek help in a Dynamics forum, which you find here: https://learn.microsoft.com/en-us/answers/questions/5969599/unmanaged-tenant-holds-our-company-domain-external
To get help here from persons like me who know SQL Server well, but who don't necessarily know anything about Dynamics, we would at a minimum need to see the code of the stored procedure.