@Marcous Constantine Thanks for reaching out and apologies for delay on this.
Are you still facing the issue, if yes, can you share the query that you have written. you should be able to use the extension property attributes in dynamic queries.
Do note, that the custom attributes can be used/bring in by SAAS application on on premises resource. if it is not AAD native, you will have to bring in custom properties using the Get Custom properties option while creating the Dynamic group.
Do let us know the status so that we can help you accordingly.
-----------------------------------------------------------------------------------------------------------------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.