set security token for SecurityNamespace.SetPermissions Method TFS RRS feed

  • Question

  • Hi,

    I want to set "Edit Build Definition" permission programmatically for a TFS Group with guid xxx in a Team Project with guid yyy, using SecurityNamespace.SetPermissions Method.

    Seeing the method signature, I see the security token parameter and I don't know the value that I must pass to the method.

    sn.SetPermissions(securityToken, id, action.Bit, 0, true);

    Can you help me, please?

    Friday, May 18, 2018 2:56 PM

All replies

  • Ideally you should just do this using the REST API.

    Here's the answer that was given by someone else for the same issue.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, May 21, 2018 3:52 PM
  • MS just announced the deprecation of the non-REST APIs by 2020. You'll probably want to look into the APIs.

    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, May 22, 2018 1:51 PM
  • Hi PoliNello,

    Since your question is more related to TFS, you could post a new thread in StackOverFlow.


    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 23, 2018 7:50 AM