Hi Mohammed-Ghaleb,
Thank you for connecting with us in Microsoft community.
Initially, I have found one official document Configure group settings using PowerShell - Microsoft Entra ID | Microsoft Learn.
According to your description, seems like your concern environment is associated with Azure AD security group, I was consulting your case with my team members, I would like to share some more specific information with you. If certain part of things can be achieved by particular PowerShell script or Microsoft Graph API or from Microsoft Entra portal, Microsoft has separate community channel resources where our related most valuable professional and community members can provide possible information for certain different support scope resources platform, so would you mind to contacting and placing your concern on our dedicated separate Microsoft Q&A community channel?
Actually, this community does not focus PowerShell script or Microsoft Graph API platform resources related scenario, because we are mainly focusing pure Office 365 exchange online license service and some general in-built function of Teams related scenario on this community.
However, there is an another specific channel for your mentioned concern where you may get some possible information for certain specific resources and platform from our related community members.
I would really appreciate your precious time. Thank you one again for your kind cooperation and contribution.
Have a good day.