New-IDSession
SYNOPSIS
Authenticates a user to a CyberArk Identity tenant.
SYNTAX
URLCredential
New-IDSession [-tenant_url] <String> [-Credential] <PSCredential> [-WhatIf] [-Confirm] [<CommonParameters>]
URLSAML
New-IDSession [-tenant_url] <String> -SAMLResponse <String> [-WhatIf] [-Confirm] [<CommonParameters>]
SubdomainCredential
New-IDSession -tenant_subdomain <String> [-Credential] <PSCredential> [-WhatIf] [-Confirm] [<CommonParameters>]
SubdomainSAML
New-IDSession -tenant_subdomain <String> -SAMLResponse <String> [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Use this command to authenticate to CyberArk Identity.
Specify the tenant either by its CyberArk Identity URL, or by its shared services subdomain.
Allows a user to provide authentication details, and satisfy any required MFA challenges.
Currently supports all Identity MFA authentication mechanisms except U2F & DUO.
When you specify a username associated with a SAML or OIDC-based federation, then you will be redirected to the external identity provider to authenticate. Alternatively, you can provide a SamlAssertion from a configured external IDP.
If your tenant is configured to require a PIN code after external identity provider authentication, you will be prompted to enter the PIN code displayed in the browser to complete the sign-in.
EXAMPLES
Example 1
PS C:\> $Cred = Get-Credential
PS C:\> New-IDSession -tenant_url https://sometenant.id.cyberark.cloud -Credential $Cred
Initiates authentication to specified tenant, and allows selection and answer of any required MFA challenges.
Example 2
PS C:\> $SAMLResponse = New-SAMLInteractive -LoginIDP "https://1234.idp.com/app/cyberarkidentity/i5d7/sso/saml"
PS C:\> New-IDSession -tenant_url https://sometenant.id.cyberark.cloud -SAMLResponse $SAMLResponse
Authenticates to CyberArk Identity using SAML assertion from external IDP (obtained using PS-SAML-Interactive)
Example 3
PS C:\> New-IDSession -subdomain sometenant -Credential $Cred
Initiates authentication to the CyberArk Identity tenant of the sometenant shared services subdomain (https://sometenant.cyberark.cloud), found through platform discovery.
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Credential
Credential object containing username and password required to authenticate to CyberArk Identity.
Type: PSCredential
Parameter Sets: URLCredential, SubdomainCredential
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-tenant_url
The URL of the CyberArk Identity tenant to authenticate to.
Type: String
Parameter Sets: URLSAML, URLCredential
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SAMLResponse
A SAML assertion obtained from an external IDP for the account with which to authenticate.
Type: String
Parameter Sets: URLSAML, SubdomainSAML
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-tenant_subdomain
The shared services subdomain of the tenant, the first part of its platform URL: sometenant for https://sometenant.cyberark.cloud.
The CyberArk Identity tenant URL is found from it through platform discovery.
Type: String
Parameter Sets: SubdomainSAML, SubdomainCredential
Aliases: subdomain
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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.