Microsoft Graph

Latest Articles

Using Certificate-based Authentication with the Microsoft Graph PowerShell SDK

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.

November 9, 2021

Using the Microsoft SDK for PowerShell to Report Azure AD Account Sign-ins

The Microsoft Graph SDK for PowerShell can be used for many purposes, among which is access to Azure AD account sign-in data. In this article, we explain how to use the SDK cmdlets to retrieve sign-in data for both tenant and guest accounts and report what we find. You can use the report to identify potentially unused accounts which might not need some expensive licenses, or guest accounts that are no longer used.

October 26, 2021

Send Exchange Online Email Using the Microsoft Graph SDK for PowerShell

Many people use the PowerShell Send-MailMessage cmdlet to send email from Exchange Online. In this article, we explain how to use cmdlets from the Microsoft Graph SDK for PowerShell to do the same job. The reason why this is important is that Microsoft will eventually deprecate the Send-MailMessage cmdlet as part of its campaign to eliminate basic authentication from Exchange Online. A replacement will be needed for all those PowerShell scripts which uses Send-MailMessage. This is one solution.

October 18, 2021

Consumption Models and Potential Cost Introduced by Microsoft’s New Teams APIs Require Careful Calculation

Along with the general availability of a new Graph Export API for Teams, Microsoft is introducing new licensing and charging models. Understanding the charging incurred for different uses will take some time to sort out and could pose real challenges for ISVs working in the migration space. Developers need to understand terms like model A and model B, seeded capacity, and consumption units and how these apply to their apps. The question now is if this is a test bed for Microsoft to apply similar charges to other APIs.

October 5, 2021

Connecting to the Microsoft Graph Using the PowerShell SDK

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.

September 23, 2021

How to Report Teams Channel Storage with Microsoft Graph API and PowerShell

Within large organizations utilizing Teams, generating reports on channel storage and then migrating this data is extremely difficult. To help map out how Teams uses SharePoint, this article introduces a simple Graph API/PowerShell script to report Teams channels and their SharePoint locations and walks you through the steps so you can run the report yourself.

July 15, 2021

Microsoft Is Moving the Office 365 Service Communications API to the Graph

Microsoft is moving the Office 365 Service Communications API to the Microsoft Graph. The new API is in public preview. Converting PowerShell scripts from the old API to the new isn't particularly difficult if you have ever worked with the Graph before. As always, the devil is in the detail, but persistence and some mild swearing should be enough to get scripts over the line. This article explores how to use the new API to fetch and report details of service incidents.

July 15, 2021

Creating Personal Contacts in User Mailboxes with PowerShell and the Graph

An earlier article explained how to create organizational contacts in user mailboxes with Graph API calls. This article builds on that idea with three improvements. First, we select target mailboxes for update by looking for those added in the last month. Second, we allow any mail-enabled recipient to be added as an organizational contact. Third, we incorporate some code to check if a contact already exists in a mailbox. Like anything with PowerShell, this code can be improved..

June 15, 2021
Creating Custom B2B Guest User Invitations with Graph API 12 Comments
Azure AD Microsoft Graph API PowerShell

Creating Custom B2B Guest User Invitations with Graph API

Azure AD business-to-business guest user accounts are a terrific way to securely grant access to apps and services for external users and partner organizations. In this article, a script is introduced that can be used to automate the guest user invitation process, integrating it more seamlessly with any custom applications.

June 2, 2021
Prepopulating Outlook Contacts with the Graph API 55 Comments
Microsoft Graph

Prepopulating Outlook Contacts with the Graph API

When contacts are added to an organizations Global Address List (GAL), they do not always populate in the users personal device contacts depending on what app, device, etc. is being used. This becomes problematic when users working from outside the office are unable to contact the IT Service Desk, HR, or other internal services. To solve the problem, this article introduces a PowerShell script that will read a set of standard contacts from a CSV file and write them as personal contacts to user mailboxes. Mobile devices can then synchronize these contacts along with others created by the user.

May 20, 2021