Hello,
SQL Server Error 18456 indicate a login authentication error:
https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error?view=sql-server-ver16
Testing the linked service checks the ability to reach the SQL endpoint but does not validate the ability to login and perform operations
Please check user credentials are correct by connecting to your SQL Server Managed Instance directly using the same username and password..
Managed Instance supports both SQL Server Authentication and Azure Active Directory Authentication. Make sure the SQL Server Managed Instance is set to the correct authentication mode that aligns with the credentials you're using.
If this answer was helpful please mark it as accepted so others users with same question can find this topic.