Hello @Fredrik Olofsson
It seems you are getting an error "Unable to access the Microsoft Graph API - Insufficient privileges to complete the operation."
You need Azure AD access to have possibility to list Azure AD objects(Users, Groups, SPs, etc)
https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/users-assign-role-azure-portal