I have been able to use AAD for backoffice and AADB2C for members, but only separately - not both together.
Cobbling the 2 together i was surprised when it compiled and booted and not so surprised when the signins failed (example stacktrace excerpt below) after the auth completes and user is redirected back to the site.
System.InvalidOperationException: Sequence contains more than one element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at Microsoft.Owin.Security.AuthenticationManager.<AuthenticateAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Security.AuthenticationManagerExtensions.<GetExternalLoginInfoAsync>d__2.MoveNext()
in d:\\a\\1\\s\\src\\Umbraco.Web\\Security\\AuthenticationManagerExtensions.cs:line 83
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Editors.BackOfficeController.<RenderDefaultOrProcessExternalLoginAsync>d__24.MoveNext()
in d:\\a\\1\\s\\src\\Umbraco.Web\\Editors\\BackOfficeController.cs:line 363
I'm pretty weak in OWIN knowledge, but assume that the issue relates to adding 2 authentication configurations into the middleware that have conflicting scope.
Anyone have an example of getting these 2 to work together, or how to separate the responsibility for backoffice and members in the middleware?
(if that is the issue here)
I have just hit this having followed the 24days guide and implemented AADB2C, but keeping with Umb Cloud for back-office authentication. I'm finding they don't play well together either.
Did you all get anywhere with this that you would be willing to kindly share?
Azure Active Directory for backoffice + Azure Active Directory B2C for members
Hey folks, looking for some guidance on how to get AAD for backoffice and AADB2C for members running.
Thanks to the excellent posts from Shannon: https://shazwazza.com/post/configuring-azure-active-directory-login-with-umbraco/
and Davy: https://24days.in/umbraco-cms/2019/aad-and-headless/umbraco8-aadb2c/
I have been able to use AAD for backoffice and AADB2C for members, but only separately - not both together.
Cobbling the 2 together i was surprised when it compiled and booted and not so surprised when the signins failed (example stacktrace excerpt below) after the auth completes and user is redirected back to the site.
I'm pretty weak in OWIN knowledge, but assume that the issue relates to adding 2 authentication configurations into the middleware that have conflicting scope.
Anyone have an example of getting these 2 to work together, or how to separate the responsibility for backoffice and members in the middleware? (if that is the issue here)
Thanks in advance!
Hi Kris,
I am also having similar requirement and stuck in integrating two providers (front end and back-end) in single project.
Have you successfully completed the integration ? any code sample do you have ?
Hi,
I have just hit this having followed the 24days guide and implemented AADB2C, but keeping with Umb Cloud for back-office authentication. I'm finding they don't play well together either.
Did you all get anywhere with this that you would be willing to kindly share?
Thanks
Hi Rob,
Have you found any solution for this? We're having exactly the same problem. Thanks!
is working on a reply...