OHDSI Home | Forums | Wiki | Github

Problems using AD with Atlas - webapi/user/me 401


We are attempting to set up WebAPI and Atlas to use Active Directory.
However we never seem to connect to our PDC.
Instead, we get 401 errors for WebAPI/user/me and WebAPI/user/login/ad .

I believe the initial 401 you get from user/me is expected because you aren’t authenticated yet. The second request to user/login/ad resulted in a 401, and that’s the reason you got the ‘bad credentials’.

Thanks for the update and explaining the initial 401 for webapi/user/me.

We were under the impression that security.ldap.* wasn’t necessary if using security.ad.* . I’ve re-added (ie. uncommented out) security.ldap.* and can now log in using AD.
However, am getting 401 and 403’s when clicking Configuration in Atlas.

Right, so that looks like it’s an issue of permissions. (403 = unauthorized). basically, you need to add yourself to a role…ie: admin role.

Do you think you’d be able to look at your SEC_USER and SEC_ROLE and SEC_USER_ROLE tables to be able to add the proper record to SEC_USER_ROLE to associate your user id to the admin role?

I’m sorry , i don’t have all the information at the top of my head, but that’s basically what you would need to do if security is enabled. Automatic security configuration is something that would be a good enhancement to webapi, but for now it’s a manual process.

t