einast / PS_M365_scripts

Public repository of scripts
8 stars 10 forks source link

Connection error #4

Closed marosonda closed 2 years ago

marosonda commented 2 years ago

Hello,

Not sure if You have experienced this error too but looks like Health Message cards stopped working. Error message points us to use Graph to access the resource. Haven't find any useful info on this issue yet. Do You experience this error too ?

Thanks

Transcript started, output file is C:\Scripts\O365\logs\553_MS365_Check\553_MS365_Check.ps1_04-01-2022_09-00.log PS>TerminatingError(Invoke-RestMethod): "Please use MSGraph to access this resource https://docs.microsoft.com/en-us/graph/api/resources/service-communications-api-overview?view=graph-rest-1.0&preserve-view=true" Invoke-RestMethod : Please use MSGraph to access this resource https://docs.microsoft.com/en-us/graph/api/resources/serv ice-communications-api-overview?view=graph-rest-1.0&preserve-view=true At C:\Scripts\O365\553_MS365_Check.ps1:127 char:14

einast commented 2 years ago

Hi,

I have not been using these scripts for over a year, as I unfortunately work less with Microsoft 365 these days. It seems the API is either deprecated or has some other issues. I quickly replaced it with the Graph API in the https://github.com/einast/PS_M365_scripts/blob/master/M365HealthStatus.ps1 script as a test. It is now working in my test lab.

I have little time to fix the other scripts now, but will look into that when I get some spare time. The fix can be implemented in the other scripts as well.

marosonda commented 2 years ago

Hi,

Looks like they deprecated Office API, the new version works fine for me too. Thanks for the update. Roadmap messages were delivered today, however I think those are not using API. at all. I also have tweaked the script which posts the Message center messages using new Graph API, and they are loaded successfully in PowerShell but are not posted to Teams, haven't found the reason for it yet....

einast commented 2 years ago

Road map does not use API but RSS, so they should be fine as long as the RSS is up.

I did a quick fix for the message card script as well. I will look into update the remaining scripts once I get some more spare time (hopefully this weekend).

marosonda commented 2 years ago

I waited to get my Azure app updated on PROD just to make sure it's not the issue in LAB tenant but i can't make the message cards script work. The messages are loaded but aren't delivered to Teams. If I list $messages.value in ISE I see several records being there but as I said no new posts in Teams however...

einast commented 2 years ago

That's strange, verified that I got messages in to my teams channel in my own tenant.

If you see messages from the variable as you say, can you try to increase the time period variable?