An Introduction to Microsoft Graph API and PowerShell - Robert Prüst - PSConfEU 2023

  Рет қаралды 3,339

PowerShell Conference EU

PowerShell Conference EU

Күн бұрын

I, Robert Prüst, explain that we will begin with some API theory and slides, as it is important to understand the basics before delving into practical demonstrations. I inquire about the audience's experience working with Microsoft Graph API and Azure AD portal, noting that even those who didn't raise their hands may have still used the API in some way.
I define an API as an application programming interface that provides a uniform way of accessing applications, likening it to a menu at a restaurant. I discuss the user-friendliness and platform compatibility of APIs.
Next, I introduce the common methods used in APIs, including Get, POST, PUT, PATCH, and DELETE. I explain the purpose of each method and how they differentiate.
Moving on, I delve into URIs and endpoints, providing examples of how they are structured for Microsoft Graph API. I inform the audience that the documentation offers details on the endpoints and their usage.
I emphasize the importance of authentication for accessing the Microsoft Graph API and clarify that tokens are used for authentication. I draw a parallel between tokens and theme park tickets, illustrating that they grant access to specific areas based on permissions.
I mention that acquiring the necessary permissions for specific actions is outlined in the documentation, which I provide to the audience.
Acknowledging that not everyone may be able to see the slides, I assure the audience that I will reference the documentation and provide any pertinent information.
In this part of the podcast, we delve into permission types in app registration. There are two overarching permission types: delegated and application. Delegated permissions come into play when logging in with a user and determine the least to most permissive permissions required. Application permissions are employed when automating tasks and necessitate permissions set by the app registration. For instance, if I wish to list users, I would require the UserReadAll permission.
Next, we discuss authentication tokens and their format. I explain that I will provide a live example later and stress the importance of including the authentication token in the header when making requests to the Graph API.
Subsequently, we explore request headers and their role in providing information to the API, such as the expected response format and the authentication token. I emphasize the significance of including the requisite headers to attain the desired response.
Finally, I touch upon the fact that when modifying or creating something, information needs to be furnished in the request body, typically in JSON format. I highlight that the documentation offers comprehensive information on the required body format and the projected response.
Moving forward, I announce that I will now demonstrate the practical usage of the Graph API. Before delving into automation, I share a trick for manually obtaining a token for experimentation. I suggest utilizing the Graph Explorer tool or the browser development tools in the Azure AD portal to retrieve the token. I demonstrate how to identify the token in the headers and recommend the JWT.ms website as a secure resource for decoding the token and viewing its details.
In conclusion, I underscore the necessity of possessing the correct permissions in the token and stress the need to acquire a new token when necessary. I mention that the token has a validity period and elucidate how to check its details. Lastly, I briefly discuss the options of using InvokeWebRequest and InvokeRestMethod to interact with the Graph API in PowerShell.
In this part of the podcast, I discuss how to construct a URI in code and interact with an API. I commence by showcas…

Пікірлер
Keeping Secrets: State of the Union - Evgenij Smirnov - PSConfEU 2023
46:19
PowerShell Conference EU
Рет қаралды 402
Managing with Microsoft Graph (and PowerShell)
33:21
John Savill's Technical Training
Рет қаралды 43 М.
100❤️
00:20
Nonomen ノノメン
Рет қаралды 72 МЛН
I Built a Shelter House For myself and Сat🐱📦🏠
00:35
TooTool
Рет қаралды 34 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 35 МЛН
Demystifying permissions and app consent when accessing Microsoft Graph
25:48
Microsoft Community Learning
Рет қаралды 3,7 М.
Building a Large PowerShell Application - Bruce Payette - PSConfEU 2023
34:28
PowerShell Conference EU
Рет қаралды 1,1 М.
Master the Graph for Exchange PowerShell
1:01:03
MSExchangeTeam
Рет қаралды 2,7 М.
Getting Started with Microsoft Graph and PowerShell
18:07
Travis Roberts
Рет қаралды 19 М.
Connecting to Microsoft Graph API with Python msal library.
13:48
Python Bites
Рет қаралды 11 М.
Moving from Azure AD PowerShell to Microsoft Graph PowerShell
19:40
Разряженный iPhone может больше Android
0:34
Cadiz smart lock official account unlocks the aesthetics of returning home
0:30
КОПИМ НА АЙФОН В ТГК АРСЕНИЙ СЭДГАПП🛒
0:59