Hi @Eskil Lundgren , if I understand your task correctly, have you looked into bulk downloading? https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/users-bulk-download
You can export all user data from the portal. Please let me know if this works for you!
If this answer helped you please mark it as "Verified" so other users may reference it.
Thank you,
James