It would be great if after creating the teams you could also store the appropriate IDP group in the team.
Here you could work e.g. with a regex or a filter
AD Group name: AAD-Test1-Dev-Admins
GH Teams Name: Test1-Dev-Admins
IDP group name: AAD-Test1-Dev-Admins
If an IDP group is set, no user object from the AD must be stored.