title: How to generate AQIAAAAAAAUgAAAAIAIAAA== out of 'BUILTIN/Administrators' or 0x01020000000000052000000020020000
body: <p>I'm playing with automatically granting permissions to SSRS users using ReportServer.dbo.SetPolicy stored procedure and I'm stuck with updating @XmlPolicy field which contains the following:</p>
  
  <p>@XmlPolicy  = 'BUILTIN\AdministratorsAQIAAAAAAAUgAAAAIAIAAA==Content Manager'</p>
  
  <p>The GroupUserId above is obviously the SID of BUILTIN\Administrators account which is 0x01020000000000052000000020020000.</p>
  
  <p>The question is how can I convert (encode) 0x01020000000000052000000020020000 to the AQIAAAAAAAUgAAAAIAIAAA== format?</p>
  
  <p>Or is there a better way to do this?
  Thank you.</p>