Skip to content

New MdeServicePrincipal

Jan-Henrik Damaschke edited this page Sep 18, 2022 · 1 revision

external help file: PSMDE-help.xml Module Name: PSMDE online version: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exposed-apis-create-app-webapp?view=o365-worldwide schema: 2.0.0

New-MdeServicePrincipal

SYNOPSIS

Creates a service principal (app registration) for Defender for Endpoint.

SYNTAX

New-MdeServicePrincipal [[-name] <String>] [[-permissions] <String>] [-delegated] [-initialize]
 [-dontOpenGrantUrl] [<CommonParameters>]

DESCRIPTION

Creates a service principal (app registration) for Defender for Endpoint with a given set of permissions to interact with MDE.

EXAMPLES

EXAMPLE 1

New-MdeServicePrincipal -name 'PSMDE-SP' -permissions 'read' -delegated

EXAMPLE 2

New-MdeServicePrincipal -permissions 'readwrite' -initialize

EXAMPLE 3

New-MdeServicePrincipal -dontOpenGrantUrl

PARAMETERS

-name

Optional. Service principal name, defaults to 'PSMDE'.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: PSMDE
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-permissions

Optional. Service principal permissions, defaults to 'read'. Possible values are 'read', 'readwrite'. Assigns either all 'Read' or all 'ReadWrite' permissions to the new service principal.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: Read
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-delegated

Optional. If defined, the service principal will be created with delegated, not with application permissions.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-initialize

Optional. If defined, a secret will be generated and the service principal details will be handed over to Set-MdeAuthorizationInfo.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-dontOpenGrantUrl

Optional. If defined, it will not open a browser after the service principal was created to grant permissions.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Author: Jan-Henrik Damaschke

RELATED LINKS

https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exposed-apis-create-app-webapp?view=o365-worldwide

Clone this wiki locally