It works as follows:
Set up the active directory in the Confluence User Directories section
The app makes use of the "User Name Attribute:" found under "User Schema Settings"
depending on what is set here different user formats are received
in case this is set to sAMAccountName the usernames in the Confluence system would be set to Sam Account Names. The Connector thus would use these usernames for authentication.
So the username is dependent on the configuration of this attribute.
Please make sure that you are using the same attribute on both SharePoint and Confluence to avoid problems with authentication.