Hi @Zahem Khalid ,
The best way to query the Configuration Profiles is by using Microsoft Graph. To do so, the Global Admin must give consent to using Graph.
The script by TomWechsler on Tech Community retrieves all assigned Intune policies and applications per Azure AD group and shows which Azure Active Directory groups have been assigned to the configuration profiles.
There is a modified version of this script that exports the information to a CSV and outputs the device configurations for the groups.
Let me know if this is what you are looking for.
If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar information.