M365 group modification

Hello All,
Greetings!
Previously we had a number of new M365 groups created. I have tried adding them to a security role in Analysis Services but I get an error saying: Failed to save modifications to the server. Error returned: 'The user or application: 'demo1@Company portal .onmicrosoft.com' was not found in your organization's Azure Active Directory. Details: 'Invalid item 'demo1@Company portal .onmicrosoft.com' in Azure AD Graph request. It looks like the Retention groups need to be added to the Active Directory for them to be able to be used in the security groups.
M365 Group: 'demo1@Company portal .onmicrosoft.com'
Please suggest! Thank you in advance :)