Skip to content

Commit

Permalink
Merge pull request #170 from srozemuller/access-token-authentication
Browse files Browse the repository at this point in the history
update PowerShell module version
  • Loading branch information
srozemuller authored Nov 9, 2023
2 parents 05e606c + 0e23d2d commit cb6e893
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Az.Avd/Az.Avd.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'Az.Avd.psm1'

# Version number of this module.
ModuleVersion = '3.1.0'
ModuleVersion = '3.1.1'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down
57 changes: 54 additions & 3 deletions Az.Avd/en-US/Az.Avd-help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@
</dev:type>
<dev:defaultValue>[string]::Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SubscriptionId</maml:name>
<maml:description>
<maml:para>Specify a subscription ID to set the Azure context. Can be changed later using Set-AvdContext.</maml:para>
Expand Down Expand Up @@ -756,6 +756,18 @@
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SubscriptionId</maml:name>
<maml:description>
<maml:para>Specify a subscription ID to set the Azure context. Can be changed later using Set-AvdContext.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>RefreshToken</maml:name>
<maml:description>
Expand Down Expand Up @@ -807,7 +819,7 @@
</dev:type>
<dev:defaultValue>[string]::Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SubscriptionId</maml:name>
<maml:description>
<maml:para>Specify a subscription ID to set the Azure context. Can be changed later using Set-AvdContext.</maml:para>
Expand Down Expand Up @@ -843,6 +855,33 @@
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
<command:syntaxItem>
<maml:name>Connect-Avd</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SubscriptionId</maml:name>
<maml:description>
<maml:para>Specify a subscription ID to set the Azure context. Can be changed later using Set-AvdContext.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>AccessToken</maml:name>
<maml:description>
<maml:para>Provide an access token to use for authentication.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
Expand Down Expand Up @@ -881,7 +920,7 @@
</dev:type>
<dev:defaultValue>[string]::Empty</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SubscriptionId</maml:name>
<maml:description>
<maml:para>Specify a subscription ID to set the Azure context. Can be changed later using Set-AvdContext.</maml:para>
Expand Down Expand Up @@ -941,6 +980,18 @@
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>AccessToken</maml:name>
<maml:description>
<maml:para>Provide an access token to use for authentication.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues />
Expand Down
30 changes: 25 additions & 5 deletions Docs/Connect-Avd.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,26 @@ Get an access token using either authorization code flow or device code flow, th

### ClientSecret (Default)
```
Connect-Avd [-TenantID <String>] [-ClientID <String>] [-RedirectUri <String>] [-SubscriptionId <String>]
Connect-Avd [-TenantID <String>] [-ClientID <String>] [-RedirectUri <String>] -SubscriptionId <String>
[-ClientSecret <String>] [-Scope <String>] [<CommonParameters>]
```

### Refresh
```
Connect-Avd [-TenantID <String>] [-RefreshToken <String>] [<CommonParameters>]
Connect-Avd [-TenantID <String>] -SubscriptionId <String> [-RefreshToken <String>] [<CommonParameters>]
```

### DeviceCode
```
Connect-Avd -TenantID <String> [-ClientID <String>] [-RedirectUri <String>] [-SubscriptionId <String>]
Connect-Avd -TenantID <String> [-ClientID <String>] [-RedirectUri <String>] -SubscriptionId <String>
[-Scope <String>] [-DeviceCode] [<CommonParameters>]
```

### AccessToken
```
Connect-Avd -SubscriptionId <String> [-AccessToken <String>] [<CommonParameters>]
```

## DESCRIPTION
Get an access token using either authorization code flow or device code flow, that can be used to authenticate and authorize against resources in Azure.

Expand Down Expand Up @@ -111,10 +116,10 @@ Can be changed later using Set-AvdContext.
```yaml
Type: String
Parameter Sets: ClientSecret, DeviceCode
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Expand Down Expand Up @@ -181,6 +186,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -AccessToken
Provide an access token to use for authentication.
```yaml
Type: String
Parameter Sets: AccessToken
Aliases:

Required: False
Position: Named
Default value: None
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](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down

0 comments on commit cb6e893

Please sign in to comment.