Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query for phone numbers

dse November 2, 2018

Hello everybody,

 

I have been trying the phone number of all the users from Confluence, but have not been able to find phone numbers in the database.

They are not located in the Active Directory.

I hope somebody can help me with this problem.

1 answer

1 accepted

1 vote
Answer accepted
Mesut Yilmazyildirim
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2018

Those values are stored in the in OS_PROPERTYENTRY table.
For user phone number, look for the row with the entity_key 
confluence.user.profile.phone.

 

select * from confluence.OS_PROPERTYENTRY where entity_key='confluence.user.profile.phone';
dse November 2, 2018

Thank you very much for the help.

I have not been able to see a foreign key on which I can get the user name. Is there a way to do this?

Mesut Yilmazyildirim
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2018

There was a CONTENT table in old releases and I was using below SQL to get user names also. But it is not working right now since there is no any table named as CONTENT

 

SELECT OS_PROPERTYENTRY.string_val, CONTENT.USERNAME
FROM confluence.OS_PROPERTYENTRY
INNER JOIN confluence.CONTENT
ON OS_PROPERTYENTRY.entity_id=CONTENT.CONTENTID
AND OS_PROPERTYENTRY.entity_key='confluence.user.profile.phone';
dse November 2, 2018

Thank you so very much for your help.

I added a join to user_mapping which gave me the user names.

SELECT OS_PROPERTYENTRY.string_val, user_mapping.USERNAME
FROM intranet.OS_PROPERTYENTRY
INNER JOIN intranet.CONTENT ON OS_PROPERTYENTRY.entity_id=CONTENT.CONTENTID
JOIN intranet.user_mapping ON CONTENT.USERNAME = user_mapping.user_key
AND OS_PROPERTYENTRY.entity_key='confluence.user.profile.phone';

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events