aad app role list
Gets Azure AD app registration roles
Usage
m365 aad app role list [options]
Options
--appId [appId]
Application (client) ID of the Azure AD application registration for which to retrieve roles. Specify either
appId
,appObjectId
orappName
--appObjectId [appObjectId]
Object ID of the Azure AD application registration for which to retrieve roles. Specify either
appId
,appObjectId
orappName
--appName [appName]
Name of the Azure AD application registration for which to retrieve roles. Specify either
appId
,appObjectId
orappName
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
For best performance use the appObjectId
option to reference the Azure AD application registration for which to retrieve roles. If you use appId
or appName
, this command will first need to find the corresponding object ID for that application.
If the command finds multiple Azure AD application registrations with the specified app name, it will prompt you to disambiguate which app it should use, listing the discovered object IDs.
Examples
Get roles for the Azure AD application registration specified by its object ID
m365 aad app role list --appObjectId d75be2e1-0204-4f95-857d-51a37cf40be8
Get roles for the Azure AD application registration specified by its app (client) ID
m365 aad app role list --appId e75be2e1-0204-4f95-857d-51a37cf40be8
Get roles for the Azure AD application registration specified by its name
m365 aad app role list --appName "My app"
Response
- JSON
- Text
- CSV
- Markdown
[
{
"allowedMemberTypes": [
"User"
],
"description": "Managers",
"displayName": "Managers",
"id": "0a545986-9142-4c88-909c-34f3c11abbc4",
"isEnabled": true,
"origin": "Application",
"value": "managers"
}
]
displayName description id
----------- ----------- ------------------------------------
Managers Managers 0a545986-9142-4c88-909c-34f3c11abbc4
description,displayName,id,isEnabled,origin,value
Managers,Managers,0a545986-9142-4c88-909c-34f3c11abbc4,1,Application,managers
# aad app role list --appObjectId "29d99e17-96b7-46aa-816d-b52bfeeafeb9"
Date: 2023-06-01
## Managers (0a545986-9142-4c88-909c-34f3c11abbc4)
Property | Value
---------|-------
description | Managers
displayName | Managers
id | 0a545986-9142-4c88-909c-34f3c11abbc4
isEnabled | true
origin | Application
value | managers