Hi @ Ahmed Essam ,
If you still need to keep directory synchronization or need to use Exchange for other purposes(e.g. SMTP relay), it's not supported to remove the last Exchange server.
You need to keep at least one Exchange server on-premises for recipient management.
In scenario two of this document, the actual state required to preserve directory synchronization is shown:
You can also learn more from the other two scenarios mentioned in the article.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.