Skip to content

aad sp get

Gets information about the specific service principal

Usage

aad sp get [options]

Options

Option Description
--help output usage information
-i, --appId [appId] ID of the application for which the service principal should be retrieved
-n, --displayName [displayName] Display name of the application for which the service principal should be retrieved
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Remarks

When looking up information about a service principal you should specify either its appId or displayName but not both. If you specify both values, the command will fail with an error.

Examples

Return details about the service principal with appId b2307a39-e878-458b-bc90-03bc578531d6.

aad sp get --appId b2307a39-e878-458b-bc90-03bc578531d6

Return details about the Microsoft Graph service principal.

aad sp get --displayName "Microsoft Graph"

More information