How can I pass Azure AD groups through to the PHP client?

I’m making a site which uses PHP, with Auth0 and Azure AD as authentication.
In order to restrict access to specific pages, I need to get information about the user’s groups in Azure AD at the PHP client.

Does anyone have any advice on how best to do this? I can see the groups in the user profile on Auth0 if that’s any help?