Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Update AccountName with sAMAccountName Instead of Personal Email

KarthikaMoorti
New Contributor
New Contributor

Hi, 

Issue:

Our client noticed that, all Exchange accounts created have the personal email address as the name. whereas it should be the sAMAccountName.

Fix:

We fixed this issue for future new onboarding user's accounts by generating AccountNameRule in the Endpoint.

Goal:

But our goal is to update existing accounts name with sAMAccountName (systemusername) instead personal email as account name.

What is the solution to fix this issue?

 

19 REPLIES 19

rushikeshvartak
All-Star
All-Star

You need to fix one time from Exchange.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak, thanks for your response.

I just wanted to make sure this fix is in Saviynt.

And can you please be more precise or explain in detail?

  • In order to update existing all impacted accounts you need to updated expected accountname in Exchange as sAMAccountName (systemusername) 
  • Since you are changing account name this will be new account in Saviynt. existing all saviynt account will be marked as Suspended from Import Service.
  • You can raise new account request for all impacted existing accounts from saviynt. If you need saviynt to perform this action. But this will huge ask as you also need to pass other required information from saviynt.

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Is there any possibility to update the existing accountname with sAMAccountName using Enhanced Query Job?

If yes, can you please provide any sample query?

You can update in Saviynt but what about target application

Select accountkey as accounts__primarykey,'newsAMAccountName' as accounts__name from accounts where endpointkey=1 and name='accountname_old' limit 1;


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

KarthikaMoorti
New Contributor
New Contributor

Hi Rushikesh,

We tried to update the above query for one account as you mentioned but it did not update the sAMAccountName.

You could see in the below screenshot that Total records updated as 0/Zero. But Job ran successfully.

KarthikaMoorti_0-1715616964578.png

 

@KarthikaMoorti : When you run the select statement in data analyzer are you getting any output? Also I see you have used endpointkey=1 is this matching in your environment? Does you exchange endpoint key is 1?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Thanks for your response, Saathvik.

Missed to change the actual endpointkey value.

You need to change endpointkey as per your application else use accountkey column

Select accountkey as accounts__primarykey,'newsAMAccountName' as accounts__name from accounts where accountkey=1 limit 1;

get accountkey from url of account when you open it


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Missed to update the actual endpointkey value and now it's working as expected (sAMAccountName got updated as account name)

Now, our challenge is to update multiple exchange accounts (nearly 400) name at a time.

How we can achieve this using Enhanced Query Job?

Perform Union

Select accountkey as accounts__primarykey,'newsAMAccountName1' as accounts__name from accounts where endpointkey=1 and name='accountname1_old' union

Select accountkey as accounts__primarykey,'newsAMAccountName2' as accounts__name from accounts where endpointkey=1 and name='accountname_old' union

Select accountkey as accounts__primarykey,'newsAMAccountName400' as accounts__name from accounts where endpointkey=1 and name='accountname_old400

 

 

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Is there is any option to upload all the accounts name (email) to update sAMAccountName uisng .csv file? 

Will it perform update action or Insert (as a new account) action?

Also, let us know the only option to perform this update is using Union in Enhanced Query Job in Saviynt?

  • Is there is any option to upload all the accounts name (email) to update sAMAccountName uisng .csv file?  ---> No for updating accountname
  • Will it perform update action or Insert (as a new account) action?-- New Account
  • Also, let us know the only option to perform this update is using Union in Enhanced Query Job in Saviynt? Yes 

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

When we tried to attempt using union in Enhanced Query it throws below error:

KarthikaMoorti_0-1715888997896.png

 



Share query


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Select accountkey as accounts__primarykey,'John.Doe' as accounts__name from accounts where endpointkey=3 and name='johndoe@gmail.com' union

Select accountkey as accounts__primarykey,'Jane.Doe' as accounts__name from accounts where endpointkey=3 and name='janedoe@yahoo.com' union

Select accountkey as accounts__primarykey,'James.Doe' as accounts__name from accounts where endpointkey=3 and name='jamesdoe@gmail.com' 

We also tried adding ' , ' ' ; ' instead of union and even tried accountkey instead of endpointkey.

[This post has been edited by a Moderator to remove sensitive information.]

Unfortunately union is not supported rushikeshvartak_0-1715908559546.png

Alternate workaround

 

SELECT
accountkey AS accounts__primarykey,
CASE
WHEN name = 'johndoe@gmail.com' THEN 'John.Doe'
WHEN name = 'janedoe@yahoo.com' THEN 'Jane.Doe'
WHEN name = 'jamesdoe@gmail.com' THEN 'James.Doe'

END AS accounts__name
FROM
accounts
WHERE
endpointkey = 3
AND name IN ('johndoe@gmail.com', 'janedoe@yahoo.com', 'jamesdoe@gmail.com') limit 3;

rushikeshvartak_1-1715908901424.png

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Thanks for the alternate option using Enhanced Query Job.

But we worked around and completed the task by Unmapping existing Exchange accounts and recreated them with sAMAccountName using .csv file.

Thanks,

Karthika Punyamoorti

Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.