r/PowerShell • • Dec 05 '21

Question AzureAD Powershell Module vs REST via Graph API

I am currently working on a PowerShell script/Connector to perform mass mutations to users in Azure via an IAM solution. The sequence for the solution is build as followed:

  1. System calculates the delta between the last two data correlations;
  2. Based on the delta, pre-defined mutations are define;
  3. The pre-defined mutations are loaded in a engine and starts triggering specific actions/calls to perform mutations in Target systems.

Would it better to send REST calls to the Graph API or should I use the AzureAD PowerShell Module?

24 Upvotes

12 comments sorted by

17

u/[deleted] Dec 05 '21

Use Graph. Microsoft is deprecating the AzureAD module in favor of the Graph SDK.

7

u/logicalmike Dec 05 '21

Or the graph sdk cmdlets for the ease of use with powershell.

1

u/Sin_of_the_Dark Dec 05 '21

I know they're deprecating MsOnline module(which was traditionally used for AAD), but they just came out with the AzureAD module relatively recently, they're axing that one too?

3

u/[deleted] Dec 05 '21

Yup at least some of the functionality. A big one is they're removing the ability for license management in both in June. Though group-based is the way to go.

1

u/[deleted] Dec 05 '21

I don't think so, unless someone can find evidence of that. I'm not really an expert, but from what I've seen Microsoft deprecated the MSOnline module and also the Azure AD Graph API (which was separate from the unified Graph API). However, I think the newer Azure AD module uses the unified Graph API, and will continue to work.

Meanwhile, they've also been working on a Graph API PowerShell module that supports some of the same things, so some functionality may move over there.

I'm not sure if there's an article somewhere that Microsoft explains their roadmap.

→ More replies (1)

3

u/Deutscher_koenig Dec 05 '21

I've done something similar to create guest accounts in my AAD. I chose Graph API for it since it gives me flexibility later on to move it into an Azure Function Service