Add-AdfsClient
Add-AdfsClient
Registers an OAuth 2.0 client with AD FS.
構文
Parameter Set: Name
Add-AdfsClient [-ClientId] <String> [-Name] <String> [[-RedirectUri] <Uri[]> ] [-Description <String> ] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The Add-AdfsClient cmdlet registers an OAuth client with 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.
パラメーター
-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.
エイリアス |
なし |
必須? |
true |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Description<String>
Specifies a description. The cmdlet adds a description for the OAuth 2.0 client to register with AD FS.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies a name. The cmdlet adds a name for the OAuth 2.0 client to register with AD FS.
エイリアス |
なし |
必須? |
true |
位置は? |
2 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-PassThru
作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
3 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
- string, string, uri[], string
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- System.Object
例
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"