{"id":492,"date":"2023-10-02T13:33:39","date_gmt":"2023-10-02T11:33:39","guid":{"rendered":"https:\/\/www.paalolav.no\/?p=492"},"modified":"2023-10-02T13:34:03","modified_gmt":"2023-10-02T11:34:03","slug":"get-hubsite-or-site-id","status":"publish","type":"post","link":"https:\/\/www.paalolav.no\/?p=492","title":{"rendered":"Get hubsite or site ID"},"content":{"rendered":"\n<p>This is perhaps the tinyest post I&#8217;ve made to date.<\/p>\n\n\n\n<p>I often need to find the GUID of a site for ny various search querys. There are many ways to acheive this, but the quickest to date is to use the API through the SharePoint URL in your browser:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/tenant.sharepoint.com\/sites\/sitename\/<strong>_api\/site\/id<\/strong><\/code><\/pre>\n\n\n\n<p>If your scope is the hubsite you&#8217;re searching from, this is a even quicker approach when doing a KQL search:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DepartmentId:{{Hub.HubSiteId}}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is perhaps the tinyest post I&#8217;ve made to date. I often need to find the GUID of a site for ny various search querys. There are many ways to acheive this, but the quickest to date is to use the API through the SharePoint URL in your browser: If your scope is the hubsite [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":493,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69,67,76],"tags":[],"class_list":["post-492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it","category-sharepoint","category-search"],"_links":{"self":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts\/492"}],"collection":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=492"}],"version-history":[{"count":2,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions\/495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=\/wp\/v2\/media\/493"}],"wp:attachment":[{"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.paalolav.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}