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:
@XmlPolicy = ‘BUILTIN\AdministratorsAQIAAAAAAAUgAAAAIAIAAA==Content Manager’
The GroupUserId above is obviously the SID of BUILTIN\Administrators account which is 0x01020000000000052000000020020000.
The question is how can I convert (encode) 0x01020000000000052000000020020000 to the AQIAAAAAAAUgAAAAIAIAAA== format?
Or is there a better way to do this?
Thank you.
“
AQIAAAAAAAUgAAAAIAIAAA==” is just the binary string01 02 00 00 00 00 00 05 20 00 00 00 20 02 00 00encoded in Base64.