@Leilah Taouk Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.
Based on the shared information, I understand that you are trying to connect to SQL dB from app service using Managed identity and facing login failed error messages.
As you are connecting via managed identity there is no need to use the dB connection string in app setting you need to create a user in Sql db as mentioned in this tutorial.
Modify your code by following the document to connect to SQL dB via C# programmatically.
Hope this helps, let me know if you have any further questions on this.