Kaffeeundcode
Script Library
PowerShell 11.12.2025

Script Workspace

List AdminRoles

Review the purpose, inspect the code, then test it safely in your own tenant.

68_List-AdminRoles.ps1

<#
.SYNOPSIS
    Lists Intune Admin Roles (RBAC).
    
.DESCRIPTION
    Requires 'DeviceManagementRBAC.Read.All' permission.

.NOTES
    File Name: 68_List-AdminRoles.ps1
    Author: Mattia Cirillo
    Version: 1.0
#>

param()

Connect-MgGraph -Scopes "DeviceManagementRBAC.Read.All"

$Roles = Get-MgDeviceManagementRoleDefinition -All

if ($Roles) {
    $Roles | Select-Object DisplayName, IsBuiltIn, Id | Format-Table
}