Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 = "https://someURLinthecloud.atlassian.net/wiki"
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
TAGS
Community showcase
Asked in Atlassian Account

Upcoming AMA with the Atlassian Identity Product Managers!

"Atlassian Account" is a space where you can raise questions about your Atlassian Account and your identity across all of our Atlassian Cloud Products. This involves understanding User Managemen...

1,179 views 8 17
View question

Community Events

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

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you