{"id":49527814,"url":"https://github.com/royashbrook/crispy-adventure","last_synced_at":"2026-05-02T04:04:39.283Z","repository":{"id":37936513,"uuid":"486737027","full_name":"royashbrook/crispy-adventure","owner":"royashbrook","description":"variant of laughing-barnacle that pulls an item from O365 list","archived":false,"fork":false,"pushed_at":"2023-03-06T04:08:13.000Z","size":540,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-28T17:57:57.679Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"crispy-adventure.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/royashbrook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-28T20:19:52.000Z","updated_at":"2022-05-12T19:03:03.000Z","dependencies_parsed_at":"2023-02-09T00:16:35.678Z","dependency_job_id":null,"html_url":"https://github.com/royashbrook/crispy-adventure","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":"royashbrook/laughing-barnacle","purl":"pkg:github/royashbrook/crispy-adventure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royashbrook%2Fcrispy-adventure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royashbrook%2Fcrispy-adventure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royashbrook%2Fcrispy-adventure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royashbrook%2Fcrispy-adventure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royashbrook","download_url":"https://codeload.github.com/royashbrook/crispy-adventure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royashbrook%2Fcrispy-adventure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32522253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-02T04:03:53.443Z","updated_at":"2026-05-02T04:04:39.279Z","avatar_url":"https://github.com/royashbrook.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# New Project\n\n✨ Project template using:\n\n- [Svelte](https://svelte.dev)\n- [Snowpack](https://snowpack.dev/)\n- [Simple.css](https://simplecss.org/)\n- [svelte-spa-router](https://github.com/ItalyPaleAle/svelte-spa-router)\n- [Microsoft MSAL.js](https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-overview)\n- [Microsoft Graph API](https://docs.microsoft.com/en-us/azure/active-directory/develop/microsoft-graph-intro)\n- [Office 365](https://www.office.com/)\n\nThis project is based on [laughing-barnacle](https://github.com/royashbrook/laughing-barnacle).\n\nIt provides an example of:\n- A SPA application that\n- Auto authenticates using MSAL.js upon startup\n- Automatically gets a token for Microsoft Graph API upon successful authenication\n- Provides a button to pull a value from a O365 site list by id and display it\n\nSince CORS is not supported for SPA apps directly to a Azure Key Vault, this is showing how you could store that data in a sharepoint list and pull it.\n\nWhile lack of CORS support with the Key Vault was the inspiration for creating this, everything here would work the same way if you wanted to pull list items from O365 for any other reason.\n\n# Install\n\nSee [laughing-barnacle](https://github.com/royashbrook/laughing-barnacle) as the major steps are the same with a couple of notable differences:\n\n1. The app registration must have permissions of `Sites.Read.All`\n2. You need a sharepoint list\n\nBelow, I'll include details on how I added the site and the list.\n\n## Create sharepoint site to hold the secret list\n\n![image](https://user-images.githubusercontent.com/7390156/165871590-23a1c736-ce09-487a-9198-974157338097.png)\n\n_note: this is a private site with only one list on it to hold the 'secret' data. this could also be a secured list on an existing site, but i figured i would include the process i used to test this._\n\n## Create a new list to hold the secret data\n\n![image](https://user-images.githubusercontent.com/7390156/165871660-aa7051fb-2dc7-47ee-99e4-6c5b76b2dd10.png)\n\n## Add a secret item to the secret list\n\n![image](https://user-images.githubusercontent.com/7390156/165958782-19ec8a45-37a6-43e1-9560-c0e17b217968.png)\n\nWe are going to pull it by the record ID in this example, so we don't need another field to put the data in. Sinced this is the first record, the ID will be 1. You could modify the graph query to pull multiple items, or search by name or use other fields, etc etc. But for the sake of this example this will do the trick.\n\n## Get the path to use for the query using Microsoft Graph Explorer\n\nI want to simply query this one record, so off to graph explorer to find all of my ids again. Let's search for my site:\n\n![image](https://user-images.githubusercontent.com/7390156/165873121-517a08f9-1a57-42a0-abef-52771a2f8520.png)\n\nSo our site id is appears to be `ashbrookio.sharepoint.com,5d8c920c-cd55-4c5e-be46-784c50e0dded,591d0d2c-7744-45e9-ab45-053a32a8df87`\n\nWe can view lists on that site with:\n\nhttps://graph.microsoft.com/v1.0/sites/ashbrookio.sharepoint.com,5d8c920c-cd55-4c5e-be46-784c50e0dded,591d0d2c-7744-45e9-ab45-053a32a8df87/lists\n\nWe can enumerate the items on that list with:\n\nhttps://graph.microsoft.com/v1.0/sites/ashbrookio.sharepoint.com,5d8c920c-cd55-4c5e-be46-784c50e0dded,591d0d2c-7744-45e9-ab45-053a32a8df87/lists/secrets/items\n\nWe can reduce the data returned by adding some query parameters like:\n\nhttps://graph.microsoft.com/v1.0/sites/ashbrookio.sharepoint.com,5d8c920c-cd55-4c5e-be46-784c50e0dded,591d0d2c-7744-45e9-ab45-053a32a8df87/lists/secrets/items/1?expand=fields(select=title)\u0026$select=id\n\nAnd, finally, we can remove all of the odata metadata by adding this header:\n\n`headers.append(\"Accept\", \"application/json;odata.metadata=none\");`\n\nThis will leave you with a nice clean'ish response like:\n\n```\n{\n    \"id\": \"1\",\n    \"fields\": {\n        \"Title\": \"I'm secret with ID1!\"\n    }\n}\n```\n\nUnfortunately, there doesn't appear to be a way (that I could find) to *just* get one of the fields values in the response. I don't really need the ID, and would be perfectly happy with just getting the text value back for the property I want, but this does the trick. If anyone sees this and knows how to just get the text, please reach out. Everything would be the same, but I imagine we'd just update the query parameters above.\n\nIn my case, I just pulled the `Title` property out to display, and it looked like this after hitting the button:\n\n![image](https://user-images.githubusercontent.com/7390156/165961585-6f1c0bb0-03e6-4cbd-993c-1f3360377480.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyashbrook%2Fcrispy-adventure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyashbrook%2Fcrispy-adventure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyashbrook%2Fcrispy-adventure/lists"}