@Avital Malka, Thanks for posting in Q&A.
For "List group transitive members". there is no attribute with managed device. Here is a link with more details:
From your description, I know you don't want to use the manageddevice API. After researching, I find the device API in AAD can help. It has an attribute "managementType" which shows if the device is managed by MDM.
https://learn.microsoft.com/en-us/graph/api/device-list?view=graph-rest-beta&tabs=http
Hope it can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.