Skip to content

Instantly share code, notes, and snippets.

View seanstory's full-sized avatar

Sean Story seanstory

  • Elastic
  • Nashville, TN USA
View GitHub Profile
@seanstory
seanstory / ms_auth_comparison.py
Created March 18, 2025 20:19
Python script that compares Client Secret vs Certificate credentials for the Sharepoint roleassignments API
import asyncio
from contextlib import asynccontextmanager
from datetime import datetime, timedelta
import aiohttp
from azure.identity.aio import CertificateCredential
tenant_id = "<id here>"
tenant_name = "<name here>"
site_name = "<site name here>"
import asyncio
from contextlib import asynccontextmanager
from datetime import datetime, timedelta
import aiohttp
from azure.identity.aio import CertificateCredential
tenant_id = "<id here>"
tenant_name = "<name here>"
site_name = "<site name here>"
#!/bin/bash
echo "What is your Access Token? (Example: cfcbcbae003c1ff47cd338edb32da3749b6652f3739ed2c55384542a1dc9cccd)"
read ACCESS_TOKEN
echo "What is your Key? (Example: 5e7bce38f74c32c93d685d4f)"
read KEY
echo "What is your Host? (Example: workplace-search-1.ea-eden-3-staging.elastic.dev)"
read HOST
ACCESS_TOKEN=`echo $ACCESS_TOKEN | tr -d '[:blank:]'`
@seanstory
seanstory / demo_business_records.json
Last active June 9, 2022 21:58
A json listing of fake businesses
[
{
"business_id": "b72ed9bb-d74d-44f6-bb23-83ed7e51121d",
"business_name": "Jane",
"city": "New York",
"street_address": "100 W Houston St",
"phone_number": "(212) 254-7000",
"tags": [
"Breakfast & Brunch",
"American (New)",