Using Microsoft.Graph with the O365 script execution configuration

We need to use Microsoft.Graph as part of a workflow script, but it's proving difficult due to the sheer size of Microsoft.Graph, we constantly come up against memory issues and which caused the jobs to fail and eventually the Admin service to fail.

We only actually need to use Micorosft.Graph.Groups and Microsoft.Graph.Identity.DirectoryManagement, which are tiny in comparison, but we cannot import them with O365ImportModules.

Has anyone had any luck working with Microsoft.Graph via O365ImportModules?

Parents
  • I wouldn't bother with O365ImportModules.

    Setup an application with the appropriate permissions in your tenant.

    Create a certificate for / on your AR server and import it to the application.

    In your code implement a connection (Connect-MgGraph) referencing your new app and certificate thumbprint.

Reply
  • I wouldn't bother with O365ImportModules.

    Setup an application with the appropriate permissions in your tenant.

    Create a certificate for / on your AR server and import it to the application.

    In your code implement a connection (Connect-MgGraph) referencing your new app and certificate thumbprint.

Children