Skip to content

New-PodeAuthAzureADScheme

SYNOPSIS

Create an OAuth2 auth scheme for Azure AD.

SYNTAX

New-PodeAuthAzureADScheme [[-Tenant] <String>] [-ClientId] <String> [-ClientSecret] <String>
 [[-RedirectUrl] <String>] [[-InnerScheme] <Hashtable>] [<CommonParameters>]

DESCRIPTION

A wrapper for New-PodeAuthScheme and OAuth2, which builds an OAuth2 scheme for Azure AD.

EXAMPLES

EXAMPLE 1

New-PodeAuthAzureADScheme -Tenant 123-456-678 -ClientId abcdef -ClientSecret 1234.abc

PARAMETERS

-ClientId

The Client ID from registering a new app.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientSecret

The Client Secret from registering a new app.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InnerScheme

An optional authentication Scheme (from New-PodeAuthScheme) that will be called prior to this Scheme.

Type: Hashtable
Parameter Sets: (All)
Aliases:

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

-RedirectUrl

An optional OAuth2 Redirect URL (default: \<host>/oauth2/callback)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant

The Directory/Tenant ID from registering a new app (default: common).

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: Common
Accept pipeline input: False
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