Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Possible to use PowerShell to talk to Confluence? Can't auth - 403

I'm a PowerShell afficionado and I've installed module 'ConfluencePS' from PowerShell gallery, for the purpose of talking to our Atlassian Cloud environment - Confluence and Jira.

I'd love to be able to programmatically get the # of licenses we have at any one time, so I can notify colleagues, etc. 

I swear that I used to be able to authenticate to our Atlassian via this method, but over the last year or so, the authentication fails, resulting in a 403 Forbidden.

Again, using module ConfluencePS in PowerShell, I'm running commands like this:

$SpaceKey = "OurSpaceIdentifier"
$BaseURI = ""
Set-ConfluenceInfo -BaseURI $BaseURI

I'm storing $creds in a variable, based on my login username (my full email address) and prompting to enter my password and storing that using a PowerShell method 'ConvertFrom-SecureString' and then writing that out to a file, which I then read in whenever I need to authenticate.  It's the method that (I swear) worked in the past.

Anyway, when I run the following command, I get a '403 Forbidden':

Get-ConfluencePage -Title 'Title of a page within the space' -SpaceKey $SpaceKey -Credential $creds

WARNING: Confluence returned HTTP error 403 - Forbidden
Invoke-Method : com.atlassian.confluence.api.service.exceptions.PermissionException: Parent page view is restricted

Is it still possible to authenticate against these products using scripted languages like this?

1 answer

Hi Daniel. 

In your case it seems that the parent page has restrictions so that you are not able to access it. Restrictions are inherited.


I just upgraded to the newest confluence version on my confluence server and now I am not able to connect. I get a 401 error message. It may be because REST api for confluence no longer accepts basic auth.. 


Best Regards Tine Benmalek

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events