Powershell Graph Module

Troops 11 Reputation points
2023-09-28T08:54:44.88+00:00

Hi all,

Do I need to register azure app to be able to use graph ps module or is it enough to just install the module and after every connection to MS graph just specify the permissions?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,508 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Luke 45 Reputation points
    2023-09-28T09:03:51.79+00:00

    To use the Microsoft Graph PowerShell module, you don't necessarily need to register a new Azure App. However, the specifics depend on what you're trying to achieve:

    If you just install the Microsoft Graph PowerShell module and use the Connect-MgGraph cmdlet, it will prompt you for login. By default, it uses a public client (an already registered app by Microsoft) for the authentication.

    This is great for quick tasks.

    If you need more control, like specific permissions, application permissions, or using client credentials, you'll want to register an Azure App.

    Once registered, you can grant the necessary permissions to the app in Azure AD and then use the Connect-MgGraph with the -ClientId, -TenantId, and possibly -ClientSecret or -CertificateThumbprint parameters.

    This approach is more suitable for production scripts, automation, or when you need specific permissions that the default experience doesn't provide.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.