Social Login with Azure AD not working - Azure account not linked to any users #2794

Closed
opened 2026-02-05 05:13:44 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ritchie-spinlock on GitHub (May 17, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hi,

I've configured BookStack to use Azure AD Social Login following these instructions. After setting it up, I tried logging in but we needed to get an admin to provide consent for users to access the app. After we added consent we've been getting the following error:

[2022-05-17 05:27:08] production.ERROR: This Azure account is not linked to any users. Please attach it in your profile settings.  {"exception":"[object] (BookStack\\Exceptions\\SocialSignInAccountNotUsed(code: 0): This Azure account is not linked to any users. Please attach it in your profile settings.  at /var/www/bookstack/app/Auth/Access/SocialAuthService.php:180)
[stacktrace]
#0 /var/www/bookstack/app/Http/Controllers/Auth/SocialController.php(90): BookStack\\Auth\\Access\\SocialAuthService->handleLoginCallback()

This is happening after my user account authenticates with AD.

There doesn't seem to be many options for configuring BookStack with AD in the settings page.

Any help would be appreciated.

Thanks.

Exact BookStack Version

BookStack v22.04.2

Log Content

No response

PHP Version

No response

Hosting Environment

Ubuntu 22.04 LTS

Originally created by @ritchie-spinlock on GitHub (May 17, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hi, I've configured BookStack to use Azure AD Social Login following [these instructions](https://www.bookstackapp.com/docs/admin/third-party-auth/#azuread-microsoft). After setting it up, I tried logging in but we needed to get an admin to provide consent for users to access the app. After we added consent we've been getting the following error: ``` [2022-05-17 05:27:08] production.ERROR: This Azure account is not linked to any users. Please attach it in your profile settings. {"exception":"[object] (BookStack\\Exceptions\\SocialSignInAccountNotUsed(code: 0): This Azure account is not linked to any users. Please attach it in your profile settings. at /var/www/bookstack/app/Auth/Access/SocialAuthService.php:180) [stacktrace] #0 /var/www/bookstack/app/Http/Controllers/Auth/SocialController.php(90): BookStack\\Auth\\Access\\SocialAuthService->handleLoginCallback() ``` This is happening after my user account authenticates with AD. There doesn't seem to be many options for configuring BookStack with AD in the settings page. Any help would be appreciated. Thanks. ### Exact BookStack Version BookStack v22.04.2 ### Log Content _No response_ ### PHP Version _No response_ ### Hosting Environment Ubuntu 22.04 LTS
OVERLORD added the 🐕 Support label 2026-02-05 05:13:44 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 17, 2022):

Hi @slsritchie,
The message is referring to the "Social Accounts" section when you edit your user profile page.
Here you can link social accounts.

By default, Logging in won't connect to, or create, an account in BookStack.
If you want that functionality, please see the "Automatic Registration" section at the top of our docs page:
https://www.bookstackapp.com/docs/admin/third-party-auth/#automatic-registration

@ssddanbrown commented on GitHub (May 17, 2022): Hi @slsritchie, The message is referring to the "Social Accounts" section when you edit your user profile page. Here you can link social accounts. By default, Logging in won't connect to, or create, an account in BookStack. If you want that functionality, please see the "Automatic Registration" section at the top of our docs page: https://www.bookstackapp.com/docs/admin/third-party-auth/#automatic-registration
Author
Owner

@ssddanbrown commented on GitHub (May 29, 2022):

Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed respond to my previous comment and this can then be re-opened.

@ssddanbrown commented on GitHub (May 29, 2022): Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed respond to my previous comment and this can then be re-opened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2794