O365ImportModules SharePoint supported?

Greetings..

I am looking to create a script to assign an employees manager READ access to their OneDrive.

Am I able to import/connect to the SPOService the same way I can connect to $context.O365ImportModules("exchangeonlinemanagement").

The rest of the script seems pretty straightforward:

$siteUrl = "https://<your-tenant>-my.sharepoint.com/personal/<UserEmail>_<domain>"
$managerEmail = "<ManagerEmail>"
Set-SPOUser -Site $siteUrl -LoginName $managerEmail -IsSiteCollectionAdmin $false
Parents
  • I don't believe the Microsoft.Online.SharePoint.PowerShell module is available in $context.O365ImportModules.

    You can still install the module on your ARS server(s) and use the module in your scripts though.  We do this for a few services such as Teams.  We install the certificate for the service principal on the ARS server(s) and use that for the credentials.

Reply
  • I don't believe the Microsoft.Online.SharePoint.PowerShell module is available in $context.O365ImportModules.

    You can still install the module on your ARS server(s) and use the module in your scripts though.  We do this for a few services such as Teams.  We install the certificate for the service principal on the ARS server(s) and use that for the credentials.

Children
No Data