- 20 Aug 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
New-NectarTokenRegistration
- Updated on 20 Aug 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Registers a Nectar DXP token for connecting to Nectar DXP using JWT
Description
Registers a Nectar DXP token for connecting to Nectar DXP using JWT. One-time task required before attempting to access Nectar DXP APIs.
Stored using Microsoft SecretManagement PS module.
If SecretManagement PS module is is not installed, install via:
Install-Module Microsoft.PowerShell.SecretManagement
There are several PS modules that connect to different secret providers. Install the one appropriate for your situation prior to running this command.
For example, the PS SecretStore stores secrets on the local machine and can be installed via:
Install-Module Microsoft.PowerShell.SecretStore
Syntax
New-NectarTokenRegistration
-CloudFQDN <String>
-Identifier <String>
-AccessToken <String>
-RefreshToken <String>
-SecretVault <String>
Examples
Example 1
Connect-NectarCloud -Credential $cred -CloudFQDN contoso.nectar.services
Connects to the contoso.nectar.services Nectar DXP cloud using the credentials supplied to the Get-Credential command
Parameters
-CloudFQDN <String>
The FQDN of the Nectar DXP cloud.
Parameter | Value |
---|---|
Required | true |
Position | 1 |
Required | true |
Default Value | None |
Accept pipeline input? | true (ByValue) |
Accept wildcard characters? | false |
-Identifier <String>
An optional unique identifier (such as script name or username) to use when saving secrets to a secret store shared by multiple parties/scripts
Parameter | Value |
---|---|
Required | false |
Position | 2 |
Required | false |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-AccessToken <String>
The access token to use for connecting to Nectar DXP
Parameter | Value |
---|---|
Required | true |
Position | 3 |
Required | true |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-RefreshToken <String>
The refresh token used to refresh the Nectar DXP access token every 2 hours
Parameter | Value |
---|---|
Required | true |
Position | 4 |
Required | true |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-SecretVault <String>
The name of the secret vault to install the secret. Use if installing to non-default secret vault
Parameter | Value |
---|---|
Required | false |
Position | 5 |
Required | false |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |