A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear Arun Venkatachalam,
Greetings! Thank you for posting in Microsoft Community.
As per your description, it seems like you are using graph API to get site ID. All site IDs show the same value.
We're afraid this issue needs to be checked and fixed from back end. The best way to troubleshoot the issue further is reporting it to the related team, they have higher permission to collect logs and then investigate it from back end, find root cause of this issue.
Considering that Microsoft 365 administrator has right permission to contact related team, therefore, we sincerely recommend you let your Microsoft 365 administrator follow steps in this article, raise a support ticket and contact Microsoft related team.
For reference: How do I find my Microsoft 365 admin? - Microsoft Support
The support team has higher permission and more resource than us to check the issue further. This would be the most efficient way in handling this case for you.
Thanks for your cooperation and understanding! We hope you stay safe and healthy always.
Sincerely,
Tina | Microsoft Community Moderator