How to set up custom actions using the Microsoft Graph API

  • Last update on June 9th, 2025

CoreView enables administrators to manage Microsoft 365 environments more efficiently with custom actions powered by the Microsoft Graph API. The integration of the Microsoft Graph PowerShell SDK within CoreView lets you create custom scripts that can be executed as management actions or as part of workflows.

Important notice

As of March 31, 2025, all legacy Azure AD (AzureAD module) and MSOnline PowerShell cmdlets have been retired by Microsoft. These cmdlets are no longer supported and have ceased functioning.
All custom actions and scripts in CoreView must now use Microsoft Graph PowerShell cmdlets.
For official guidance, refer to: Find Azure AD and MSOnline cmdlets in Microsoft Graph PowerShell.  

 

Enabling Microsoft Graph API custom actions in CoreView

Before submitting your first custom action using the Graph API, please contact CoreView support to enable this module for your tenant if it is not already active.

After enablement, follow our step-by-step guide to configure Graph Management.

Script requirements

For every script that uses the Microsoft Graph API in CoreView, you must invoke the following function as the first line:

Refresh-CVGraphToken

This command refreshes your authentication token so that PowerShell Graph commands can execute securely and successfully within CoreView.

Example: creating a Security Group

Refresh-CVGraphToken
New-MgGroup -DisplayName 'Test Group' -MailEnabled:$False  -MailNickName 'testgroup' -SecurityEnabled

Action required: replacing legacy cmdlets in automations

As of now, any scripts, custom actions, or automations using AzureAD or MSOnline cmdlets will fail. Immediate action is required:

  1. Review all CoreView custom actions and workflows.
  2. Replace all legacy cmdlets with Microsoft Graph PowerShell equivalents.
  3. Test all revised scripts to ensure continuity.