cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 12

Office 365 - PowerShell script error. Exception of type 'System.InvalidOperationException'

Hi Folks,

I'm currently having the issue with all of my Office 365 monitoring Application component (SAM).

All of them showing PowerShell script error. Exception of type 'System.InvalidOperationException' was thrown. issue and thousands of emails are triggered every hour.

Where can I view the detailed error?

 

3.png

 


Note: the Service account is working fine (AD Account not locked) and I can use it to login and test some cmdlets.

0 Kudos
4 Replies
Level 10

@itengineer Have you tried using new API Poller feature instead? 2020.2.1 Release has out of the box API Poller template that substitute the Office 365 Powershell template. It's named: "Microsoft 365 Exchange Online"

@jan.rachwalik Yes, it is the latest edition of the SAM Application Template.

If you see the screenshot it is what it says 🙂

But somehow doesn't do well since it keeps on bombarding me with the email alerts, while the actual M365 services are still intact.

0 Kudos

@itengineer I meant API Poller feature that was added to SAM one year ago.

If you are on SAM 2020.2.1 go to Node in SAM that is used for M365.

Click API Poller Management -> Assign

Search for "Microsoft 365 Exchange Online" and select it and click next.

Select OAuth2.0 and click "new credential"

Provide your M365 data, SCOPE should be set to: https://manage.office.com/.default

Click "Assign Pollers"

API Poller will be created. Click on "Microsoft 365 Exchange Online" link

In the URL update the ${TENANT_ID} value. You should see below screen:

 
0 Kudos

M365API Poller.png

0 Kudos