I am trying to connect to my company's confluence space by using the ConfluencePS but I cannot seem to authenticate my account.
I have created an PAT on both Atlassian.net and directly on the Data Center that Confluence is hosted on. Neither seem to work.
The URI is set up in the format "https://confl.CompanyName.com".
The code I am using to attempt to connect is shown below.
Import-Module ConfluencePS
$Username = 'first.last@mycompany.com'
$Password = 'full_token_string' | ConvertTo-SecureString -AsPlainText -Force
$Credentials = New-Object System.Management.Automation.PsCredential($Username,$Password)
Set-ConfluenceInfo -BaseURI 'https://confl.CompanyName.com' -Credential $Credentials
Get-ConfluenceSpace -SpaceKey '####'
When this runs, I receive back a 401: UNAUTHORIZED error
I've also tried for the password, the token name, the Atlassian token, the password to my account, the token on the data center. I can't seem to find what is expecting.
Can ConfluencePS work on Data Center based Confluence pages? How can I go about using this?