Not sure if there is a difference between Azure AD and Azure AD B2C. is B2C supported in CAS 6.6.8?
Looking at integrating with Azure AD B2C via my custom login page. I see a connection being made but always with same error message. It feels like I need to define some attributes that are not supported until CAS 7.0.
Error message:
2023-08-03 17:21:59,481 TRACE [org.apereo.cas.azure.ad.authentication.AzureActiveDirectoryAuthenticationHandler] - <Fetching token for [
x...@xxxx.com]>
2023-08-03 17:21:59,493 DEBUG [org.apereo.cas.azure.ad.authentication.AzureActiveDirectoryAuthenticationHandler] - <Acquiring token for resource [
https://graph.microsoft.com/] and client id [xxxxx] for user [
x...@xxxxx.com]>
2023-08-03 17:22:00,192 ERROR [com.microsoft.aad.adal4j.AuthenticationContext] - <[Correlation ID: xxxxx] Execution of class com.microsoft.aad.adal4j.AcquireTokenCallable failed.>
com.microsoft.aad.adal4j.AuthenticationException: {"trace_id":"xxx","error_description":"AADSTS50034: The user account {EmailHidden} does not exist in the
xxxxx.com directory. To sign into this application, the account must be added to the directory.Trace ID: xxxx Correlation ID: xxxxx Timestamp: 2023-08-03 22:22:00Z","correlation_id":"xxxxx","error":"invalid_grant","error_uri":"https:\/\/
login.microsoftonline.com\/error?code=50034","timestamp":"2023-08-03 22:22:00Z"}
at com.microsoft.aad.adal4j.AdalTokenRequest.executeOAuthRequestAndProcessResponse(AdalTokenRequest.java:128) ~[adal4j-1.6.7.jar!/:1.6.7]
at com.microsoft.aad.adal4j.AuthenticationContext.acquireTokenCommon(AuthenticationContext.java:930) ~[adal4j-1.6.7.jar!/:1.6.7]
at com.microsoft.aad.adal4j.AcquireTokenCallable.execute(AcquireTokenCallable.java:70) ~[adal4j-1.6.7.jar!/:1.6.7]
at com.microsoft.aad.adal4j.AcquireTokenCallable.execute(AcquireTokenCallable.java:38) ~[adal4j-1.6.7.jar!/:1.6.7]
at com.microsoft.aad.adal4j.AdalCallable.call(AdalCallable.java:47) ~[adal4j-1.6.7.jar!/:1.6.7]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]