Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. UserID from sharepoint

UserID from sharepoint

Scheduled Pinned Locked Moved SharePoint
csharpsharepointdatabasesysadminquestion
4 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TechBang
    wrote on last edited by
    #1

    I need the current logged in username from a sharepoint portal to be passed to ASPx .Net application which resides on a non-Sharepoint server. To elaborate, the .Net application is deployed on Windows 2003 non-sharepoint server. The URL of this application is provided as hyperlink on a sharepoint site for end user accessibility. I need the currently logged in sharepoint user id or actually the user email id, to be passed to the .Net application (maybe as query string or something). The user email id is required so that the application could send out a mail notification when it finishes the job. Is there anyway I can get the mail id in the application? Thanks in advance.

    -K

    R 1 Reply Last reply
    0
    • T TechBang

      I need the current logged in username from a sharepoint portal to be passed to ASPx .Net application which resides on a non-Sharepoint server. To elaborate, the .Net application is deployed on Windows 2003 non-sharepoint server. The URL of this application is provided as hyperlink on a sharepoint site for end user accessibility. I need the currently logged in sharepoint user id or actually the user email id, to be passed to the .Net application (maybe as query string or something). The user email id is required so that the application could send out a mail notification when it finishes the job. Is there anyway I can get the mail id in the application? Thanks in advance.

      -K

      R Offline
      R Offline
      Riwut Libinuko
      wrote on last edited by
      #2

      You can use browse to the Email property of SPUser. To get SPUser, you can use SPUser user = SPContext.Current.User Riwut Libinuko Microsoft MVP | SharePoint Server | Singapore b: http://blog.libinuko.com c: http://ideasfreestsadm.codeplex.com

      T 1 Reply Last reply
      0
      • R Riwut Libinuko

        You can use browse to the Email property of SPUser. To get SPUser, you can use SPUser user = SPContext.Current.User Riwut Libinuko Microsoft MVP | SharePoint Server | Singapore b: http://blog.libinuko.com c: http://ideasfreestsadm.codeplex.com

        T Offline
        T Offline
        TechBang
        wrote on last edited by
        #3

        Will I be able to get 'SPContext.Current.User' within an application that is not hosted on a Sharepoint server. Its just been linked to a sharepoint site as a hyperlink. When the user clicks on the link, the application would run in non-sharepoint context. I'll probably have to pass both sharepoint site URL and the current user-id to the application. But I dont have a clue how to do this. Any ideas? Thanks,

        -K

        R 1 Reply Last reply
        0
        • T TechBang

          Will I be able to get 'SPContext.Current.User' within an application that is not hosted on a Sharepoint server. Its just been linked to a sharepoint site as a hyperlink. When the user clicks on the link, the application would run in non-sharepoint context. I'll probably have to pass both sharepoint site URL and the current user-id to the application. But I dont have a clue how to do this. Any ideas? Thanks,

          -K

          R Offline
          R Offline
          Riwut Libinuko
          wrote on last edited by
          #4

          The "other" application can not use SPContext.Current.User , since it doesn't relate with SharePoint. So the SharePoint application should pass the cred info to the next application. If you are using MOSS 2007 you can activate SSO (Single Sign On). Principle of SSO is to make SharePoint User -> Application User mapping. For more information on SSO, please refer here. http://msdn.microsoft.com/en-us/library/ms580316.aspx[^] If both application are in the same domain, you can use windows integrated authentication.

          Riwut Libinuko Microsoft MVP | SharePoint Server | Singapore b: http://blog.libinuko.com c: http://ideasfreestsadm.codeplex.com

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups