Hello @Kamaraj P (kamp) ,
Upon checking with the internal team, it appears that from inside the VM without authentication this is not possible due to the lack of Azure Instance Metadata Service(IMDS) as noted in the doc. which by the way will be available in the upcoming release as a public preview in Azure Stack Hub, no specific ETA as of now.
A user can still query Azure Resource Manager directly using Compute Resource Provider API but this requires authentication to ARM.
Azure VM REST API
Please "Accept as Answer" if any of the above helped so that, it can help others in community looking for remediation for the similar issues.