Hello Van Nguyen,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are unable to retrieve server endpoint for account '[servername]' using your managed identity.
The issue arises because the search service’s managed identity lacks permissions on the external server endpoint (not the search service itself). Assign the correct roles and validate network configurations, after updating permissions and configurations, delete and recreate the indexer to force a fresh connection attempt. If the issue persists, share the type of server endpoint (e.g., Azure Storage, SQL) for further troubleshooting. - Check the following resources: https://learn.microsoft.com/en-us/azure/search/search-howto-managed-identities-storage and permissions for SQL Database - https://learn.microsoft.com/en-us/azure/search/search-howto-connecting-azure-sql-database-managed-identity) and https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security#grant-access-to-azure-services and https://learn.microsoft.com/en-us/azure/search/search-howto-managed-identity-data-sources#data-source-definition
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.