I'm wondering if it's possible to retrieve data from a user's portal on Azure using the user's Azure credentials and display it on the custom website. The website currently uses npm and is coded with JavaScript and PHP.
Yes, you can use the Azure API's to query the control plane metadata. EG. Listing VM's
You would need to use a Service Principal to query, not the actual users AD Account they've signed in with.
Whether or not this is a good idea or not, I'm pretty sure it's not. You need to evaluate the user experience in querying and waiting for this data against leveraging your own datastore which will be populated by a background service that runs the queries.
Given the requirement of displaying a subset of Azure metadata on a company intranet - I think working from exports would be the most practical... Either that or just tell people to use the Azure Portal!