Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need instructions for authenticating to Confluence Cloud #203

Open
bkolodny opened this issue May 18, 2022 · 2 comments
Open

Need instructions for authenticating to Confluence Cloud #203

bkolodny opened this issue May 18, 2022 · 2 comments

Comments

@bkolodny
Copy link

Authenticating to confluence cloud is different than to an on prem server, and I and others do not know how to do it in ConfluencePS.

Instructions on how to do it should be added to the help.

@awsles
Copy link

awsles commented Sep 8, 2022

The documentation on authenticatiin is very poor (here). If your organization uses Single Sign-on, then you cannot use Get-Credential to obtain a credential for ConfluencePS or JiraPS. Furthermore, there is ZERO documentaion on how to use an API token for ConfluencePS or JiraPS. As far as I can see, it sadly does not appear possible.

If using an API token is possible, then somene please post an example (with ALL steps). For example, with Get-ConfluenceSpace.

@therealscottcarlow
Copy link

therealscottcarlow commented Feb 27, 2023

Get-Credential works with with SSO... You just don't use your password but a personal API token for the password field (obtainable via https://id.atlassian.com/manage-profile/security/api-tokens). Example:

$creds = get-credential
Set-ConfluenceInfo -Credential $creds -BaseURI "https://your-domain/atlasssian.net/wiki"

Also for those using Powershell 7 like me, where Get-Credentials is kinda gimped, I build the credential object in my scripts the old fashioned way.

$api_key = ConvertTo-SecureString <api_key> -AsPlainText -Force
$username = <username>
$creds = New-Object System.Management.Automation.PSCredential ($username, $api_key)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants