cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1193
Views
0
Helpful
11
Replies

Problem managing users with @ in username

Hello,

I have integrated UCSD with company's AD, where users are composed of <username>@<domain>. Also, I have some external scrips to manage user-to-group assignments with API. I call some functions for reading user data, and updating user data (/cloupia/api-v2/user), and they work properly if the username is simply a-z, 1-9 characters. However, an empty result is returned every time I work with logins like 'username@domain'. I tried to send the login as is, and using urlencoded format (%40 instad of @). The result is the same. Any ideas how I can make it work?

Cheers,

Krzysztof

11 Replies 11

Orf Gelbrich
Cisco Employee
Cisco Employee

Have you tried “A@B” or ‘A@b’ ?

Orf Gelbrich

Check out UCS Director Workflow INDEX<https://communities.cisco.com/docs/DOC-56419> on Cisco Communities Site (Twitter @UCSDGURU)

I tried with no quotations and with 'A@B', the result is always the same. Also, when I use REST API Browser in UCSD, it also returns empty content.

OK, I did some more tests, and it seems the issue is with '.' (dot) in username or domain. When the username is <a-z> or <a-z>@<a-z> it works fine. But if the username is <a-z>.<a-z> or <a-z>@<a-z>.<a-z> the empty result is returned. So, looks like API call does not recognize properly a dot in username, which is really bad. There are many users with a dot, let alone having domain name with a dot inside. I have over 100 users for which I have to change the group, and API is perfect tool for that, but it doesn't work :-(

What version of UCSD are you using?

I used 6.0.0.0 build 60299, but I have just patched it to the most recent version 6.0.1.1 build 60440, and the result is the same.

I looked into logfile, and foud something like this:

2017-03-15 17:28:52,585 [ORP-1-44] ERROR run(OperationRequestProcessor.java:130) - Exception occured while executing request

java.lang.Exception: unable to build context for user.Test.User. No child node found for User

This log is created when I do calls for Test.User username. It seems that the whole API engine is poorly written, someone assumed that username will not have a dot in the name. This is sad.

As a workaround can you pull all the users back and look for the user id in question...

The create and update user APIs do work. I create the russ@domain.com with the user create API.

Screen Shot 2017-03-15 at 3.27.57 PM.png

I created a bug ticket for you. CSCvd59213

Thanks.

Yes, if you create a user, and all data is within XML tags, eferything works fine. The issue seems to be with the update URL, where you have to specify the user, ie. /cloupia/api-v2/user/User.Name

Yes it chokes on the dot.

Orf Gelbrich

Check out UCS Director Workflow INDEX<https://communities.cisco.com/docs/DOC-56419> on Cisco Communities Site (Twitter @UCSDGURU)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Cisco UCS X-Series Energy Efficiency Offer