userid not passed correctly
Hi all,
I have a textbox with expression = User!UserID
The SSRS is installed on machineA which is used by userA
When I "surf" to the ssrs website , the textbox contains domain\userA
when I use another computer with another username (e.g. userB) - I see in the textbox domain\userB
Why cannot I see my user domain\userC ?
TIA Guy Cohen
December 12th, 2010 12:54pm
Hi,
If you have setup windows authentication and you are trying to access the reports from a machine within your domain, then all you need to do is to login to the machine as
userC (no matter what machine you use log in). Have you tried that?
Regards
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
BH
Free Windows Admin Tool Kit Click here and download it now
December 12th, 2010 10:26pm
Hi there
Thanks for trying
I do not need to login to a machine
I surf to the ssrs machine like that:
http://machineA/Reports/Pages/Folder.aspx?ViewMode=Detail
and click a report .
When I do it from my PC, I see the textbox conent "UserA" (The user that normally log into machineA).
When I do it from another PC, I see the textbox with "UserB" (The user that normally log into MachineB).
Going to test it from another machine.... will keep you informed :)
TIATIA Guy Cohen
December 13th, 2010 1:11am
Hi,
If you are using Windows authentication, the built-in field User!UserID indicates the domain account of the current user who is running the report.
So, as BH posted, no matter what machine you are using, the UserID field in report will show UserC if you logon a machine with account UserC and view the report.
For more information about the UserID member in User collection, please refer to the link below and check the User Section.
http://msdn.microsoft.com/en-us/library/ms157274(v=SQL.100).aspx
Thanks,
Tony ChainTony Chain [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2010 12:18am
Hi
Thanks for your answer.
I am afraid I was not so clear.
3 Users, U1,U2,U3
Log into 3 different computers (C1,C2,C3)
They all surf to the same SSRS website S1 that exists on computer C4
The report contains a textbox with the expression = User!UserID
U1 and U2 see domain\U1 and domain\U2 in that textbox
U3 does not see domain\U3
(U3 see the username that logged into C4)
How can that be ?
TIA Guy Cohen
December 15th, 2010 12:20am
Hi,
Thank you for clarification.
First, I still need to confirm that the Report Server uses Windows authentication (default). If not, please point out.
By default, UserID returns the Windows logon in the format domain\logon. However, it is unusual that U1 and U2 could see the correct UserID while U3 couldn’t. So, could you
please post the environment information of the computer C3 such as the Operating System version, and does C3 in the same domain of C1 and C2?
Additionally, if the execution option like cache or snapshot is applied, please also let me know and try to run this report with the most recent data.
Thanks,
Tony Chain
Tony Chain [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2010 2:46am
Hi Tony ,
About the OS:
After reading your reply I was sure that the problem is that I have a different OS (Windows 7)
I asked someone to login on my PC, and surfed to the site - I saw his user!
Cache:
About I went to the machine with the report, created a new report with only a textbox with the expression "=User!UserID"
Everyone see it and I dont!, I see a different UserID :(
I have Windows7, others have XP. The machine with the report is XP as well.
No cache of reports, security is set to Windows
GuyTIA Guy Cohen
December 19th, 2010 12:24am
Hi Tony ,
About the OS:
After reading your reply I was sure that the problem is that I have a different OS (Windows 7)
I asked someone to login on my PC, and surfed to the site - I saw his user!
Cache:
About I went to the machine with the report, created a new report with only a textbox with the expression "=User!UserID"
Everyone see it and I dont!, I see a different UserID :(
I have Windows7, others have XP. The machine with the report is XP as well.
No cache of reports, security is set to Windows
GuyTIA Guy Cohen
Free Windows Admin Tool Kit Click here and download it now
December 19th, 2010 12:24am
There might be some issue for your domain user at AD part. You may contact your domain administrator to recreate your account or create a new account for you to see if it helps.
You may also have a new thread in Windows Server Directory Services forum for further checking.
Please remember to mark the replies as answers if they help and unmark them if they provide no help
December 24th, 2010 3:29am
I am certain there is a problem in the AD definition.
I am not sure what and I do not want the system dept. to delete my account and re create it until i will find the problem and post it.
When the system dept. created my account they were asked to create it "like this exact user' that i see when I surf to that ssrs websitee!!!(I came to the company while she took her maternity leave .
I will post here all I Know about the cause/solution
Guy
TIA Guy Cohen
Free Windows Admin Tool Kit Click here and download it now
December 25th, 2010 9:24am
Hi again
After doing some thinking...
I logged into ANOTHER PC
using my user
and I saw the user correctly on the report's textbox
Now I am confused :)TIA Guy Cohen
December 27th, 2010 10:53am
Looks the problem was at your local computer. Could you please check your IE setting to see whether "Enable Integrated Windows Authentication" is checked under the
Security section of the Advanced tab? If not checked, check it.Please remember to mark the replies as answers if they help and unmark them if they provide no help
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 11:03am
Thanks so much for re-trying.
When other users log on to my computer they see it alright The IE setting you asked to check - is checked. I used some script from the internet (attached), and I see my user alright (on the script!)
:(
<!-- The Name of this File = username.html --><HTML>
<HEAD> <TITLE>VBScript ->Getting UserName</TITLE>
<SCRIPT LANGUAGE="VBScript">
Dim objNet
On Error Resume Next 'If fail to create object then display error
' (press no message)
Set objNet = CreateObject("WScript.NetWork")
If Err.Number <> 0 Then 'If err
MsgBox "Do not press ""No"" If your browser warns you."
Document.Location = "username.html" 'Display document by placing name again
End if
Dim strInfo
strInfo = "User Name is " & objNet.UserName & vbCRLF & _
"Computer Name is " & objNet.ComputerName & vbCRLF & _
"Domain Name is " & objNet.UserDomain
MsgBox strInfo
Set objNet = Nothing 'Destroy the Object
</SCRIPT>
</HEAD>
<BODY>
<H1 align="center">That's It</H1>
</BODY>
</HTML>
TIA Guy Cohen
December 27th, 2010 11:18am
Hi guys!
I have an answer....
somewhere in the past I probably browsed to the website using another user credentials
AND I checked "save password"
Today I cleared my cookies/history/forms data....
and its working fine!
All is ok with all machines/users :)
Thanks all for trying!!
GuyTIA Guy Cohen
Free Windows Admin Tool Kit Click here and download it now
January 8th, 2011 12:47am