Hello @Nibras A K ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
Name resolution for resources in Azure virtual networks have different scenarios, depending on which there are different DNS setups/solutions required to achieve the same.
You can find the list of name resolution scenarios in Azure and their solutions in the below link:
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances
What is your DNS setup? Are you using your own custom DNS server? You need to look into the below setup for more clarity on name resolution to and from Azure:
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.