Skip to content

Set MdeAuthorizationInfo

Jan-Henrik Damaschke edited this page Nov 29, 2022 · 3 revisions

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

Set-MdeAuthorizationInfo

SYNOPSIS

Set the authorization information that is used to get a valid MDE token.

SYNTAX

ServicePrincipal

Set-MdeAuthorizationInfo -tenantId <String> -appId <String> -appSecret <String> [-noTokenRefresh]
 [<CommonParameters>]

ConfigurationFile

Set-MdeAuthorizationInfo [-noTokenRefresh] -configurationFile <String> [<CommonParameters>]

Token

Set-MdeAuthorizationInfo -token <String> [<CommonParameters>]

EnvironmentVariables

Set-MdeAuthorizationInfo [-fromEnv] [<CommonParameters>]

DESCRIPTION

Set the authorization information that is used to get a valid MDE token.

EXAMPLES

EXAMPLE 1

Set-MdeAuthorizationInfo -tenantId '00000000-0000-0000-0000-000000000000' -appId '00000000-0000-0000-0000-000000000000' -appSecret 'APP_SECRET'

PARAMETERS

-tenantId

{{ Fill tenantId Description }}

Type: String
Parameter Sets: ServicePrincipal
Aliases:

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

-appId

{{ Fill appId Description }}

Type: String
Parameter Sets: ServicePrincipal
Aliases:

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

-appSecret

{{ Fill appSecret Description }}

Type: String
Parameter Sets: ServicePrincipal
Aliases:

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

-noTokenRefresh

{{ Fill noTokenRefresh Description }}

Type: SwitchParameter
Parameter Sets: ServicePrincipal, ConfigurationFile
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-token

Mandatory. You can provide the token directly with this parameter. If used, none of the other parameters can be used.

Type: String
Parameter Sets: Token
Aliases:

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

-fromEnv

If this switch is provided, the app registration credentials will be taken from the environment variables "MDE_APP_ID", "MDE_TENANT_ID", "MDE_APP_SECRET"

Type: SwitchParameter
Parameter Sets: EnvironmentVariables
Aliases:

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

-configurationFile

You can provide a JSON parameter file containing the values "mdeAppId","mdeTenantId" and "mdeAppSecret".

Type: String
Parameter Sets: ConfigurationFile
Aliases:

Required: True
Position: Named
Default value: None
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://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exposed-apis-create-app-webapp?view=o365-worldwide

Clone this wiki locally