-
82: MS Graph API – Adding Users to a group (python)
Following up on my posts on: Here is another simple script for adding users to an Azure Active Directory (AAD) Group. I’m passing the user object received from the GetUserByEmail method, previously shared and the AAD Group ID defined in an environment variable. Return codes 204 – The Users has been successfully added to the… Continue reading
-
81: MS Graph API – Remove a User from a Group (Python)
Following on from yesterday’s post on Finding a user by email, here’s a method for removing a user from an AAD group using MS Graph API. I’m passing in the full user object received from the GetUserByEmail method. We use the User’s Id property in the /groups/ endpoint to remove the user from the Group… Continue reading
-
80: MS Graph API – Find a user by email (python)
A simple method for finding a user by email via Graph API In this code fragment, we hit the user API with a filter for the user’s email address. The endpoint always returns an object regardless, so we need to check for the length of the Value array. If this is empty we return a… Continue reading
-
70: Obsidian
I finally got my shit together and migrated my notes from Apple Notes to Obsidian, it turned out to be less painful than I was expecting, BUT it’s a FAF. For over a decade, I’ve chosen to write all my documents using a Markdown editor of some variety: IAWriter, Bear and now Obsidian because I… Continue reading
-
69: See ya January
31/1/2023 I’ve been super busy these past few weeks, and sadly, my writing has taken a back seat, but I wanted to end the month with a recap of what we achieved. On 3/1/2023, I wrote in 50: Back to work tomorrow that we wanted to achieve the following things: So, how did we do? Successes Partial… Continue reading
-
68: Generative AI you need to check its working outs
25/01/2023 I’ve mentioned a couple of times that I’ve been playing with ChatGTP to assist with a piece of development work I’m doing. Today, I validated a new piece of code it presented me with, which looked great and was exactly what I wanted but completely wrong. I asked it How do I move a… Continue reading
-
67: JavaScript templates strings in Python
23/01/2023 When I first started learning Python, the one thing I wanted more than anything was to be able to use template strings, like had gotten used to in JavaScript. For some reason, I couldn’t find a decent article telling me how to do them. Then on Sunday, when I asked ChatGTP to generate a… Continue reading
-
66: Python: MS Graph API Authentication (Without a user)
I’m writing a script to migrate files from one location to another in Sharepoint using MS Graph API. To use the Graph API, you have to get an authentication token from Azure AD, and there are two ways to do this: 1) Acting on behalf of a user and 2) acting without a user. Both… Continue reading