Developer forum

Forum » CMS - Standard features » Problem with azure ad

Problem with azure ad

Andreas Pettersson
Reply

Hi,

I have followed the guide for Azure AD

But i get this error: 

External login info object is null. Authentication failed.

 https://site.se/Admin/Public/Social/ExternalLogin.aspx?action=login&providerID=3 401 (Unauthorized)

 

Current login info: (0) [System.Security.Principal.WindowsPrincipal] Claims: (1) [System.Security.Claims.ClaimsPrincipal+<get_Claims>d__37] DeviceClaims: (2) [System.Security.Principal.WindowsPrincipal+<get_DeviceClaims>d__13] Identities: (3) [System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Security.Claims.ClaimsIdentity, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]] Count: 1 Item 0: (4) [System.Security.Principal.WindowsIdentity] AccessToken: [Microsoft.Win32.SafeHandles.SafeAccessTokenHandle] Actor: null AuthenticationType: '' BootstrapContext: null Claims: [System.Security.Principal.WindowsIdentity+<get_Claims>d__95] DeviceClaims: [System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Security.Claims.Claim, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]] Groups: null ImpersonationLevel: Anonymous IsAnonymous: True IsAuthenticated: False IsGuest: False IsSystem: False Label: null Name: '' NameClaimType: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name' Owner: null RoleClaimType: 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid' Token: 0 User: null UserClaims: [System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Security.Claims.Claim, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]] Identity: Rendered as (4) UserClaims: (5) [System.Security.Principal.WindowsPrincipal+<get_UserClaims>d__11]

Any idea whats the problem?


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You do not have permissions? Or some AD setup is not right?

"Authentication failed." 401 (Unauthorized) indicates that you are missing something related to your permissions on Azure

 
Andreas Pettersson
Reply

Permissions to what? We followed the guide here
https://doc.dynamicweb.com/documentation-9/users/external-authentication/microsoft-365-azure-ad
https://doc.dynamicweb.com/documentation-9/users/external-authentication/external-authentication

We also tried on our Azure solution but that didnt work either.

We run version 9.15.6

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Something on Azure AD is not setup correct as it respons back with and unauthorized message. I cannot tell you what it is. But the user you are authenticating with does not have the correct Azure permissions - and you have to check up on that.

Is this when you setup the external login provider or is it when you login?

And are you sure you are using 365 AD and not Azure B2C?

 
Andreas Pettersson
Reply

Which user do you mean? Because i dont even get a login to azure. It get 401 error the same second i click on login button.

This error i get when i click the button which are connectod to this url:
https://site.se/Admin/Public/Social/ExternalLogin.aspx?action=login&providerID=3

Pretty sure we use AD and not B2C.

 
Andreas Pettersson
Reply

Do i need something special in my ConfigureAuth class? 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

How does your setup look like in Dynamicweb?

How does your setup look like in Azure?

Please show some tokens and keys. I think the token you have setup in DW is not authorized for your Azure setup

 

You must be logged in to post in the forum