Single Sign On AzureAD without Browser interaction
Asked by dev:

Hey,

could you assist me with the following Problem:

Setup: Confluence Cloud connected to Azure AD

I would like to programatically get a Token from the Azure AD and use the contents of that token to login a user into my Confluence instance.

I have been able to aquire the security token but now I am stuck. Is there a confluence cloud url (e.g. the callback url) that I can redirect the user to automatically log him/her in? And if so which data/parameters would I need to pass.

The scenario is that I have a website were users can log in and there is a documentation for that website in the conflluence cloud (no public content) that the users should get readonly access to. So when a website user requests the documentation I generate the security token with predefined credentials and the user is redirected with that token onto the confluence cloud.

Thank you for enlightening me if such scenario is at all possible.


Answers:
author: Claudiu Lionte
body: Hello [@dev](/t5/user/viewprofilepage/user-id/3573803)

Welcome to the Atlassian Community!

Looking at the context of your scenario, it appears that you want to somehow restrict access to Confluence only to users that have an account on your website but do not have an account in Confluence. Also, opening your Confluence site to the public doesn't seem to be an option.

The short answer here is that it's not possible - you can either [configure public (anonymous) access](https://confluence.atlassian.com/confcloud/setting-up-public-access-934718729.html) to your Confluence site or have Confluence user accounts for all your site's users. This is independent of the login method (SSO or email+password).

There might an alternative, but it's rather complicated: You can fetch the content from Confluence (via [REST API)](https://developer.atlassian.com/cloud/confluence/rest/)and then present it on your site, effectively restricting it only to users of your site. However, it involves some dev work and a replication of the content in Confluence, so I'd suggest against it.

However, zooming out a bit, could it be that your website is a service desk, where users create tickets? If so, you might consider adding Jira Service Desk and pairing it up with Confluence. This way you can [set up a knowledge base](https://support.atlassian.com/jira-service-desk-cloud/docs/set-up-a-knowledge-base-so-customers-can-serve-themselves/) in Confluence where your service desk customers will have read-only access without being counted as Confluence users (or Jira Service Desk agents).

comments: author: dev
body: Hello claud,

thank you for your response. That is unfortunate to hear...

Actually our website is no service desk, it is an application website which we had wanted to write usage documentation in a confluence instance. The documentation should nevertheless not be public as it might give details away to our competitors which we are unwilling to share. The users of the documentation are supposed to get readonly access.

We will probably use confluence to compose the documentation and use a plugin to make a readonly copy to use in our application.

Thank you for your time!


Tags: active-directory

cloud

confluence-cloud

saml

sso