# How to authenticate BaseSpace CLI to workgroup

When typing `bs auth`, the program creates a default configuration that will be used each time the "bs" command is used. This configuration can be used with a personal workgroup, a professional workgroup, or an enterprise workgroup.

To set either a professional or enterprise workgroup as default configuration, log into the desired domain and/or workgroup prior to pasting the link into the browser. The `bs auth --force` command may be needed if the user has already authenticated the personal account. This command overwrites the current config and set the workgroup as default config. Copy the URL generated and paste into a browser, then accept the authentication request.

![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-47cec158fa4f589b753bb3b3a5387d9b218ee87e%2Fimage1.png?alt=media\&token=7c07b9bf-8595-466c-8d2e-1a0de94527f8)

To keep the default config and create a separate config for a workgroup or vice versa, use the -c {configname} option to generate a separate configuration file. This allows the use of two or more configuration files without needed to reauthenticate each time a different BaseSpace User context is needed. Then when running commands, they also must include the config flag, such as:

bs -c {configname} upload\
bs -c {configname} whoami

![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-7609a34d6654dd6790ddf04b7f2fd49fca2f8758%2Fimage2.png?alt=media\&token=2ed8a991-7d2a-4d3f-a544-5bfd333dba08)\
![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-e866e2630ee167d57cfc16e4dc000dda26ea88ea%2Fimage3.png?alt=media\&token=9728a4c3-2e67-44a2-8948-ed61e10267be)

For further information, see the [CLI overview](https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview#authenticate) page.

\
\
\ <br>

|                                                                                                                                                                                                                                                                                                                                                                 |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| *For any feedback or questions regarding this article (Illumina Knowledge Article #8347), contact Illumina Technical Support* [*techsupport@illumina.com*](mailto:techsupport@illumina.com?subject=Question%2FFeedback%20Regarding%20Illumina%20Knowledge%20Article%20#000008347%20-%20Software%20\&body=Dear%20Illumina%20Technical%20Support,%0D%0A%0D%0A)*.* |
