Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




what permission is required for UserService.WhoAmI call

admin
usage
api

Hello.

Can you please help me with permission problem?

I'm trying to get UserEN variable using Gemini API with the following code

var user = _sm.UsersService.WhoAmI()

where _sm is an instance of ServiceManager class. It had been working for some time.

Unfourtunately now I'm getting error with message 'User A B does not have permission for: get user.' with stack source that points to the WhoAmI call in my code:

   at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response)
   at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType)
   at CounterSoft.Gemini.WebServices.BaseService.WhoAmI()
   at tfsUndGemini.CheckInForm.Commit()

I've tried to check Quick permissions user guide but failed to find permission for 'get user'.

Can you please help me and specify what type of permission in the Gemini user permissions should be turned on to make it possible to get UserEN instance?

Thank you

User10540
· 1
User10540
Replies (2)
helpful
0
not helpful

Any registered Gemini user can call this method. Can it be that your user is not enabled? Also, are you using windows authentication with Gemini?

··· yes Windows auth is used to connect via API or Web interface. In the Web interface I'm able to post comments to issues I can get my issues via API using _sm.IssuesService.GetMyWork();User10540Friday, July 22, 2011, 11:40:54 AM

Mark Wing
· 9108
Mark Wing
helpful
1
not helpful
ANSWER

the evil is in details:

for the Windows authentication I need to specify windows login name to make UserService.WhoAmI works:

new ServiceManager(s.GeminiURL, WindowsIdentity.GetCurrent().Name, "", "", true);

but IssuesService.GetMyWork() is working without login name:

new ServiceManager(s.GeminiURL, "", "", "", true);
··· Thanks for posting your solutionMark WingFriday, July 22, 2011, 12:33:56 PM

User10540
· 1
User10540