Skip to content

Commit

Permalink
Merge pull request #779 from IoannisGianko/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
pkbullock authored Nov 20, 2024
2 parents 695ee81 + 32a778c commit 6d34c6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 4 additions & 3 deletions scripts/spo-get-siteid-from-microsoftgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ $domain = $uri.Host
$siteName = $uri.AbsolutePath
# Construct the new URL
$RestMethodUrl = "v1.0/sites/$($domain):$siteName?$select=id"
$RestMethodUrl = "v1.0/sites/$($domain):$($siteName)?$select=id"
$site = (Invoke-PnPGraphMethod -Url $RestMethodUrl -Method Get -ConsistencyLevelEventual)
$siteId = $site.id
$siteId = (($site.id) -split ",")[1]
write-host $siteId
```
Expand All @@ -47,7 +47,8 @@ Sample first appeared on [Retrieving SiteId from Microsoft Graph for Subsequent
| Author(s) |
|-----------|
| [Reshmee Auckloo](https://github.com/reshmee011) |
| Ioannis Gianko|


[!INCLUDE [DISCLAIMER](../../docfx/includes/DISCLAIMER.md)]
<img src="https://m365-visitor-stats.azurewebsites.net/script-samples/scripts/spo-get-siteid-from-microsoftgraph" aria-hidden="true" />
<img src="https://m365-visitor-stats.azurewebsites.net/script-samples/scripts/spo-get-siteid-from-microsoftgraph" aria-hidden="true" />
10 changes: 8 additions & 2 deletions scripts/spo-get-siteid-from-microsoftgraph/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Retrieves SiteId from Microsoft Graph using PnP PowerShell. This can be particularly useful when making further API calls that require the SiteId."
],
"creationDateTime": "2024-06-15",
"updateDateTime": "2024-06-15",
"updateDateTime": "2024-11-10",
"products": [
"SharePoint",
"SiteId"
Expand All @@ -33,10 +33,16 @@
"type": "image",
"order": 100,
"url": "https://raw.githubusercontent.com/pnp/script-samples/main/scripts/spo-get-siteid-from-microsoftgraph/assets/preview.png",
"alt": ""
"alt": "Preview of retrieves site id from Microsoft Graph"
}
],
"authors": [
{
"gitHubAccount": "IoannisGianko",
"company": "",
"pictureUrl": "https://github.com/IoannisGianko.png",
"name": "Ioannis Gianko"
},
{
"gitHubAccount": "reshmee011",
"company": "",
Expand Down

0 comments on commit 6d34c6f

Please sign in to comment.