Add-AdfsClient

Add-AdfsClient

Registers an OAuth 2.0 client with AD FS.

Sintaxis

Parameter Set: Name
Add-AdfsClient [-ClientId] <String> [-Name] <String> [[-RedirectUri] <Uri[]> ] [-Description <String> ] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Add-AdfsClient cmdlet registers an OAuth client with Servicios de federación de Active Directory (AD FS). In order to allow access from OAuth clients to resources secured by AD FS, you need to register the OAuth client with AD FS by using this cmdlet.

When you register an OAuth 2.0 client with AD FS, you must specify a client identifier and a redirection URI, as well as a friendly name and description, for the OAuth client. When an OAuth client requests access to a resource using the OAuth 2.0 protocol, the client must specify a client identifier and redirection URI to AD FS, in accordance with RFC 6749. AD FS will not allow access to a resource to clients that specify a client identifier or redirection URI that are not registered with AD FS.

Parámetros

-ClientId<String>

Specifies a client identifier. The cmdlet adds a client identifier for the OAuth 2.0 client to register with AD FS. You can also use GUIDs to represent client identifiers.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Description<String>

Specifies a description. The cmdlet adds a description for the OAuth 2.0 client to register with AD FS.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies a name. The cmdlet adds a name for the OAuth 2.0 client to register with AD FS.

Alias

ninguno

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-RedirectUri<Uri[]>

Specifies one or more redirection URIs. The cmdlet adds the redirection URIs for the OAuth 2.0 client to register with AD FS. The OAuth 2.0 client specifies the redirection URI when it requests authorization to access a resource secured byAD FS. You can register more than one redirection URI for a single client identifier. The redirect URI must be a valid URI.

Alias

ninguno

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • string, string, uri[], string

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • System.Object

Ejemplos

Example 1: Add a client

This command registers an OAuth 2.0 client with AD FS by using a client identifier, redirection URI, name and description.

PS C:\> Add-AdfsClient -Name "Payroll Application" -ClientId "ab762716-544d-4aeb-a526-687b73838a33" -RedirectUri "ms-app://s-1-15-2-2205112887-4282980309-3272664163-2407253042-283898840-27493891-3661245662/" -Description "OAuth 2.0 client for our Payroll application"

Example 2: Add a client with multiple redirection URIs

This command registers an OAuth 2.0 client with a client identifier, two redirection URIs, a name and description with AD FS. The command uses two different redirections URIs to denote multiple forms of the application that may use different redirection URIs,

PS C:\> Add-AdfsClient -Name "Payroll Application" -ClientId "ab762716-544d-4aeb-a526-687b73838a33" -RedirectUri @("ms-app://s-1-15-2-2205112887-4282980309-3272664163-2407253042-283898840-27493891-3661245662/", "https://Contosopayrollapplication/oauthclient/") -Description "OAuth 2.0 client for our Payroll application"

Temas relacionados

Disable-AdfsClient

Enable-AdfsClient

Get-AdfsClient

Remove-AdfsClient

Set-AdfsClient