When establishing a session using the PowerShell SDK version 2.x, there are a few options to authenticate to an array that utilize tokens or a username and password combination, which are necessary for SDK version 2 cmdlets to interact with the array.
Depending on the API versions that are present on your array determines the methods to which you can connect to them via REST. FlashArray REST API Reference Guides shows the which versions of the API is included with each FlashArray Purity version. To determine exactly what API versions are supported on your array, use your browser and connect to https://<FQDN or IP Address of array>/api/api_version.
An OAuth2 authentication is the only allowed method of connecting to an array with the Purity API versions 2.0 or 2.1.
API version 2.2 and later allows for the additional authentication method of connecting using a username and password combination or API Tokens.