Answers.Body: <p>As others have noted it's not clear what you're asking but based on your wording I'm going to assume you mean via code. You can use the api explorer at <a href="https://mysite.org/civicrm/api" rel="nofollow noreferrer">https://mysite.org/civicrm/api</a> (replace "mysite" with your actual site) to explore what's available and give you some sample code. Here's how to get the drupal uid given the civi contact id.</p>
  
  <p><a href="https://i.sstatic.net/683Gm.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/683Gm.gif" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-03T09:32:56.920Z
Answers.Text: I was unable to select "CMS User".CiviCRM 5.7.0, Drupal 7
Answers.UserDisplayName: gshilin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-20T22:49:07.870Z
Answers.LastActivityDate: 2018-12-20T22:49:07.870Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>Yes,</p>
  
  <p>On the contact summary page there is a Contact ID/User ID field - the second number is the drupal uid - and links through to the user record.</p>
  
  <p><a href="https://i.sstatic.net/Ny2CQ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ny2CQ.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-20T18:39:15.570Z
Answers.LastActivityDate: 2018-12-20T18:39:15.570Z
Answers.UserDisplayName: Luke Stewart
Body: <p>Is it possible to retrieve Drupal uid from CiviCRM Contact id? Can any one please guide me? </p>
  
  <p>OR </p>
  
  <p>Is it possible to get the Drupal user detail associated to a payment contribution?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-20T19:05:43.163Z
Comments.Text: another way is via eg Views and adding a block - it depends what you are trying to do and that is not clear from your question
Comments.UserDisplayName: petednz - fuzion
Tags: <civicrm-entity>
Title: Retrieve Drupal user id from CiviCRM Contact id
ThreadText: # Retrieve Drupal user id from CiviCRM Contact id
  
  (Asked by: username_0 on 2018-12-20)
  
  Is it possible to retrieve Drupal uid from CiviCRM Contact id? Can any one please guide me?
  
  OR
  
  Is it possible to get the Drupal user detail associated to a payment contribution?
  
  **Tags:** civicrm-entity
  
  > **Comments:**
  > **username_1**: another way is via eg Views and adding a block - it depends what you are trying to do and that is not clear from your question  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-12-20. Score: 1
  
  As others have noted it's not clear what you're asking but based on your wording I'm going to assume you mean via code. You can use the api explorer at <https://mysite.org/civicrm/api> (replace "mysite" with your actual site) to explore what's available and give you some sample code. Here's how to get the drupal uid given the civi contact id.
  
  [![enter image description here](https://i.sstatic.net/683Gm.gif)](https://i.sstatic.net/683Gm.gif)
  
  > **Comments:**
  > **username_3**: I was unable to select "CMS User".CiviCRM 5.7.0, Drupal 7  
  
  ---
  
  ### Answer by username_4 on 2018-12-20. Score: 0
  
  Yes,
  
  On the contact summary page there is a Contact ID/User ID field - the second number is the drupal uid - and links through to the user record.
  
  [![enter image description here](https://i.sstatic.net/Ny2CQ.png)](https://i.sstatic.net/Ny2CQ.png)
  
  
  ---
  
  