@JUFO, Thanks for posting in Q&A.
Based on my test, I find we can use the following method to create RoleAssignment:
Request Method: POST
Request URL: https://graph.microsoft.com/beta/deviceManagement/roleAssignments
Request body: (displayname is the name of the assignment. enter the id of the admin group under members. enter id of the Scope group under resourceScopes.
{
"id": "",
"description": "",
"displayName": "test2",
"members": [
"5bc76640-a6e4-XXXXXXX-2b0e15371ec4"
],
"resourceScopes": [
"4ee993ea-16e2-XXXX8-0617424475c7"
],
"******@odata.bind": "https://graph.microsoft.com/beta/deviceManagement/roleDefinitions('abe1ef62-3XXXXXXX-95ce-cc93d74782fe')"
}
Then the roleassignment is created under Intune.
Hope the above information 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.