Connect-MgGraph Archives - Practical 365 Practical Office 365 News, Tips, and Tutorials Tue, 17 Oct 2023 18:17:17 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.2 https://practical365.com/wp-content/uploads/2022/06/favicon.png Connect-MgGraph Archives - Practical 365 32 32 How to Figure Out What Microsoft Graph Permissions You Need https://practical365.com/microsoft-graph-api-permission/ https://practical365.com/microsoft-graph-api-permission/#comments Tue, 12 Apr 2022 13:00:00 +0000 https://practical365.com/?p=55808 The Microsoft Graph operates on a least permission model, which means that developers are forced to ask for permissions for the actions they wish to perform. This is a very different approach to the way traditional PowerShell modules work, so it's an area to focus on when converting scripts which use cmdlets from the Azure AD and MSOL modules to the Microsoft Graph PowerShell SDK. In this article, we look at four ways to find out what permissions are needed to perform different actions and explain how the Graph use the permissions.

The post How to Figure Out What Microsoft Graph Permissions You Need appeared first on Practical 365.

]]>
https://practical365.com/microsoft-graph-api-permission/feed/ 17
Using the Microsoft Graph SDK for PowerShell with Azure Automation https://practical365.com/microsoft-graph-sdk-powershell-azure-automation/ https://practical365.com/microsoft-graph-sdk-powershell-azure-automation/#comments Mon, 28 Feb 2022 08:49:00 +0000 https://practical365.com/?p=55223 The Microsoft Graph PowerShell SDK is a good way to execute Microsoft Graph API queries from PowerShell scripts. In this article, we explain how to use cmdlets from the SDK with a Azure Automation runbook. The example we use is a script to send a welcome email to new employees.

The post Using the Microsoft Graph SDK for PowerShell with Azure Automation appeared first on Practical 365.

]]>
https://practical365.com/microsoft-graph-sdk-powershell-azure-automation/feed/ 10
Using Certificate-based Authentication with the Microsoft Graph PowerShell SDK https://practical365.com/use-certificate-authentication-microsoft-graph-sdk/ https://practical365.com/use-certificate-authentication-microsoft-graph-sdk/#comments Tue, 09 Nov 2021 15:52:17 +0000 https://practical365.com/?p=53800 Although it's easy to write scripts using cmdlets in the Microsoft Graph PowerShell, SDK you probably don't want to execute the scripts interactively. In this article, we explain how to use certificate-based (app-only) authentication to run scripts. This is very much an explanation about how to accomplish the task in a testing environment. If you want to run scripts in production, some extra work is needed.

The post Using Certificate-based Authentication with the Microsoft Graph PowerShell SDK appeared first on Practical 365.

]]>
https://practical365.com/use-certificate-authentication-microsoft-graph-sdk/feed/ 10
How to Create a Microsoft 365 Licensing Report Using the Microsoft Graph SDK for PowerShell https://practical365.com/create-licensing-report-microsoft365-tenant/ https://practical365.com/create-licensing-report-microsoft365-tenant/#comments Thu, 14 Oct 2021 15:01:00 +0000 https://practical365.com/?p=53503 After figuring out how to convert a script from using Azure AD licensing cmdlets (due to stop working in June 2022), we move on to create a licensing report for a tenant using cmdlets from the Microsoft Graph SDK for PowerShell. The code is pretty straightforward, but you need to do some up-front work to extract and prepare some input files containing product and service plan codes. Given that Microsoft is increasing its license fees, it's a good time to report this information...

The post How to Create a Microsoft 365 Licensing Report Using the Microsoft Graph SDK for PowerShell appeared first on Practical 365.

]]>
https://practical365.com/create-licensing-report-microsoft365-tenant/feed/ 96
Connecting to the Microsoft Graph Using the PowerShell SDK https://practical365.com/connect-microsoft-graph-powershell-sdk/ https://practical365.com/connect-microsoft-graph-powershell-sdk/#comments Thu, 23 Sep 2021 13:11:30 +0000 https://practical365.com/?p=53483 The Microsoft Graph SDK for PowerShell exists to help developers use Graph API calls from PowerShell. It works, but like anything in life, there's a right way to connect and use the SDK and a wrong way. In this article we explore topics like how to connect to the right tenant, how permissions are managed (or not), and why running Graph SDK cmdlets interactively isn't something you should do in production. Good as the SDK is, Microsoft has some big issues to solve to address some obvious security issues.

The post Connecting to the Microsoft Graph Using the PowerShell SDK appeared first on Practical 365.

]]>
https://practical365.com/connect-microsoft-graph-powershell-sdk/feed/ 43
Microsoft Forces Move from Azure AD Cmdlets for License Management https://practical365.com/microsoft-forces-move-from-azure-ad-cmdlets-for-license-management/ https://practical365.com/microsoft-forces-move-from-azure-ad-cmdlets-for-license-management/#comments Thu, 09 Sep 2021 05:22:00 +0000 https://practical365.com/?p=53319 On June 30, 2022, Azure AD and Microsoft Online Services cmdlets will stop working for license management. The result is that you need to upgrade PowerShell scripts which use these cmdlets. The choice is to use Graph API calls or cmdlets from the Microsoft Graph PowerShell SDK. In this article, we explore the steps necessary to upgrade a script to remove service plans from an Office 365 license (SKU).

The post Microsoft Forces Move from Azure AD Cmdlets for License Management appeared first on Practical 365.

]]>
https://practical365.com/microsoft-forces-move-from-azure-ad-cmdlets-for-license-management/feed/ 9