Hello dear community,
I am trying to auto generate a new confluence child Page using Powershell and OAuth token
For this I am using the commands below but always receive the error
WARNING: Confluence returned HTTP error 401 - Unauthorized
Invoke-Method : An unknown error ocurred.
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.5.0\ConfluencePS.psm1:249 char:14
+ (Invoke-Method @iwParameters).value
+ CategoryInfo : InvalidResult: (:String) [Invoke-Method], ArgumentException
+ FullyQualifiedErrorId : InvalidResponse.Status401,Invoke-Method
WARNING: Failed to create child page. Check whether you are trying to upload an existing alert version, then try again.
The approach I am using is the following
$SecurePassword = ConvertTo-SecureString $ConfluenceOuthToken -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential ($ConfluenceUserID, $SecurePassword)
$ChildPageName = 'Test' + $AlertVersion + '- Alert List'
$ScriptPath = $PSScriptRoot.Substring(0, ($PSScriptRoot.Length - 9)) + 'Alerting/Alerts/'
Set-ConfluenceInfo -BaseURi 'https://confluence.xxx.com/display/CSA' -Credential $Cred -EA 0 -WA 0
New-ConfluencePage -Title $ChildPageName -ParentID 162xxx -Body $PageBody -EA 0 -WA 0
Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event