You have to be logged into Confluence with the same browser, otherwise the following error will be shown:
Image 1: User not logged into to Confluence (click to enlarge)
Please make sure that you are logged into SharePoint Online with the same Browser, otherwise you will see the following error:
Image 2: Missing login to SharePoint (click to enlarge)
Check 3rd Party Cookie configuration
Please make sure your Browser accepts 3rd-party cookies, to be able to see Confluence content in SharePoint Online and SharePoint content in Confluence, else you might get the errors above despite being logged in both applications with same Browser.
Check Trusted Sites configuration
Please check your security zone settings to contain some important domains in the same security zone. See this page for details on which domains to include: /wiki/spaces/KB/pages/7375895.
If you aren't allowed to change these settings please inform the people in charge of this configuration to make the necessary changes.