Skip to main content

How to Update Database Record for User PrimaryAddress (SMTP)

Overview

In some cases a user who has Hosted Exchange provisioned may not be showing in the portal. This issue can occur if there is no PrimaryAddress assigned. This article will show how to assign the PrimaryAddress to get the user to appear in the portal.

important

Create a backup of the OLM database before making any changes.

Retrieve the samAccountName of the Affected User from Active Directory

Update Database Record for User PrimaryAddress

Review the Information in Database

  1. Login to your SQL server and execute the below SQL query in SQL Server Management Studio using the samAccountName as the u.[Name]:
use olm  
select ue.EmailId, u.[Name], ue.Alias, cd.CustomerDomain, ue.PrimaryAddress
from Users u
inner join UserEmail ue on ue.UserID = u.UserID
inner join CustomerDomain cd on cd.CustDomainID = ue.CustDomainID
where u.[Name] = 'testuser1_EC'
  1. Look at the result of the query. At least one email address should be set to value 1 in the PrimaryAddress column:
Update Database Record for User PrimaryAddress

Review the Primary SMTP address of the User in Active Directory

  1. Review the user's AD attribute proxyAddresses for email address configurations.
Update Database Record for User PrimaryAddress
info

You might need to enable Advanced Features within Active Directory.

  1. Take note of the entry that starts with capitalized SMTP: because this is the one that will be assigned as Primary Address in the database.
Update Database Record for User PrimaryAddress

Update the PrimaryAddress in the Database

  1. To update the PrimaryAddress to 1 in the database, run the following command, specifying the EmailId of the AD attribute that is equal to the entry in the database:
Update Database Record for User PrimaryAddress
update UserEmail  
set PrimaryAddress = 1
where EmailId = 1360

Review the Changes in the Database

  1. Re-run the previous query:
use olm  
select ue.EmailId, u.[Name], ue.Alias, cd.CustomerDomain, ue.PrimaryAddress
from Users u
inner join UserEmail ue on ue.UserID = u.UserID
inner join CustomerDomain cd on cd.CustDomainID = ue.CustDomainID
where u.[Name] = 'testuser1_EC'
Update Database Record for User PrimaryAddress
  1. The result now shows 1 as the value on the PrimaryAddress. Once one of the addresses is set to 1, the user account should now show up in the portal.