{"id":45231,"date":"2015-07-02T07:00:00","date_gmt":"2015-07-02T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20150702-00\/?p=45231\/"},"modified":"2019-03-13T12:16:58","modified_gmt":"2019-03-13T19:16:58","slug":"20150702-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20150702-00\/?p=45231","title":{"rendered":"Is a SID with zero subauthorities a valid SID? It depends whom you ask"},"content":{"rendered":"<p>Here&#8217;s an interesting table. <\/p>\n<table BORDER=\"1\" CELLPADDING=\"3\" STYLE=\"border-collapse: collapse\">\n<tr>\n<th>Function<\/th>\n<th>Is Sub&shy;Authority&shy;Count=0 valid?<\/th>\n<\/tr>\n<tr>\n<td><code>IsValidSid<\/code><\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td><code>Convert&shy;Sid&shy;To&shy;String&shy;Sid<\/code><\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td><code>ConvertString&shy;&shy;Sid&shy;To&shy;Sid<\/code><\/td>\n<td>No<\/td>\n<\/tr>\n<\/table>\n<p>That last entry creates the unfortunate situation where a SID with no subauthorities can be converted to a string, but cannot be converted back. <\/p>\n<p>If it&#8217;s any consolation, SIDs with no subauthorities aren&#8217;t encountered in normal usage, so if you ever accidentally reject one of these, it&#8217;s not going to inconvenience anyone. <\/p>\n<p>Oh, and the answer to the question at the top: Yes, a SID with zero subauthorities is technically valid. It&#8217;s a degenerate case that&#8217;s not very interesting, but it is technically valid. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maybe.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-45231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>Maybe.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/45231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=45231"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/45231\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=45231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=45231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=45231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}