Fix phone not syncing the events properly (phone setting randomly turned itself off 5 menus deep, very cool)
Problem: I'm not using my phone much, but it's my primary source for these events / schedule
I can check the outlook web view, but the website is so clunky and slow that I want to keep this to a minimum (and therefore am still using my phone)
Idea: I bet there's a calendar API. Doing a piss-simple calendar viewer for these events could be a fun small project, doesn't have to be anything fancy.
"Hardest part is probably doing the event querying from the account, but it can't be that annoying"
If only you knew
Search for "outlook calendar API"
Get large microsoft article
"Here's 5 reasons why you should integrate the calendar into your app"
??? Just give me the API
"API reference"
"Outlook calendar API in Microsoft Graph v1.0"
"Outlook calendar API in Microsoft Graph beta"
What the fuck is Microsoft Graph
"Microsoft Graph is a Microsoft API developer platform that connects multiple services and devices."
??? I don't care, just give me the endpoints
Endpoint "List calendars"
Requires authentication (duh), "Here's the basics:"
"Microsoft Graph is a protected API gateway for accessing data in Microsoft cloud services like Microsoft Entra ID and Microsoft 365"
???
More searching
Need to go to Microsoft Azure and add a Entra ID project
"Login using Microsoft Account"
Enter E-Mail
Asks me to either enter my password or some secondary mail to get a login code
Secondary mail is a very old one of mine which is full of spam mail
I should probably change this
Login
Go into microsoft accounts
Go into settings
I cannot find shit
I can find a place to add secondary mails,
I can find a place to adjust my phone number,
but it's still using my very old mail account for the code thingy
go to search engine
It's in some weird submenu
okay fixed that, back to the azure thing
Now logged in using Microsoft Account
Get Error Popup
Something about my account not being authenticated properly, recommending to re-login
???
Close
Get same Error Popup
Okay, logout
Now on azure homepage
Press login
Use microsoft credentials
Can't login, get some error with JSON IDs and other bullshit
did I just brick my account
change page
go to outlook
try to login
login works fine, legacy mail is no longer used, everything good
???
go to azure site
Now logged in
bruh
Get same fucking error popup on the page I mentioned before
close popup
get the same popup
close popup
repeat to a total of five times
click on button to create Entra ID project (do you remember I was trying to do a thing)
new page
same five popups
my brother in christ
Confirm creation
Get another error, could not be created, looks similar to error popups
Back to the search engine
Apparently it's a common issue
fun fact: this is a multi-billion dollar company
Solution is to create a proper azure billing plan, even if you just use the free version
back to azure
error popup
this is not good for my health
logout
Start billing plan
Do some reading, free plan / "pay as you use" is fine, the API I use should be free anyways
Login using microsoft account
Actually works this time
Asks me for my credit card
okay maybe reasonable due to API abuse and whatnot, fine
enter my credentials
I am back at the azure page
Create Entra ID project (do you remember this)
Do the usual setup shit:
Create app
Create secret
Add permissions
yada yada
Okay, go back to the old browser tabs, where was the endpoint I needed
Not quite sure I'm setting up everything correctly, try to find some examples instead
Microsoft provides example code, good
It's a Visual Studio solution, unlucky
scrap that, back to search engine, looking for basic ass curl commands
Find examples
Need to create token first, blah blah blah
Run example curl request
get token
Use token to run another example request
Permission denied
deep breaths
more experiments and more googling
turns out my permissions were wrong
they were only valid for user authenticated requests, and not my token requests
??? okay I guess
try again
new token, new me
example request also works now
cool
change to calendar end-point, make request
no response
???
look at verbose output of curl
request sent successfully, literally no json response from server
????????
more googling
To get access to the calendar end-point, you need to have a 365 subscription
This is the account which uses that calendar, I am part of the 365 subscription
Look at azure subscriptions
It's not listed
??????????????
Something something my azure shit needs authentication from the subscription admin