mattmcnabb / O365ServiceCommunications

A Powershell module for monitoringOffice 365 Service Health!
25 stars 6 forks source link

Unable to connects to the Office 365 Service Communications API #14

Open VinceRibs opened 4 years ago

VinceRibs commented 4 years ago

Hello,

I have the following error while connecting to the Office 365 Service Communications API. It looks like https://api.admin.microsoftonline.com/shdtenantcommunications.svc is not responding anymore for a couple of weeks. Am I correct ?

`PS C:\Sources\O365ServiceCommunications> $MySession = New-SCSession -Credential $Cred Invoke-RestMethod : Unable to connect to the remote server At C:\Sources\O365ServiceCommunications\O365ServiceCommunications\functions\New-SCSession.ps1:60 char:22

InnerException message is "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.52.192.98:443"

mattmcnabb commented 4 years ago

@VinceRibs Are you still having this issue? I've seen this occasionally over the last few years and it always seems to be transient.

ah-ezzat commented 4 years ago

Hello I have this issue also, the script was working previously but now i got "unable to connect to the remote server". :( any solutions

mattmcnabb commented 4 years ago

I can only assume that the original API has finally been deprecated as expected in #2. I am now making time to create a V2 of this module, so please bear with me as I get this done. I hope to have a preview version of this done soon. Thanks!

mattmcnabb commented 4 years ago

@VinceRibs I have just release an alpha of the module that supports the V2 API. Please run Install-Module O365ServiceCommunications -AllowPrerelease to install it and try it out. It's a completely breaking change to switch to the new API, so please reach out if you have trouble getting it up and running.

ahamin01 commented 3 years ago

I was getting the below error when running the command Install-Module O365ServiceCommunications -AllowPrerelease Install-Module : A parameter cannot be found that matches parameter name 'AllowPrerelease

Running the below commands resolved the AllowPrerelease issue

Install-Module -Name PackageManagement -Repository PSGallery -Force Install-Module -Name PowerShellGet -Repository PSGallery -Force

mattmcnabb commented 3 years ago

@ahamin01 yes, that would be expected as new PowerShell Gallery features (prerelease versions) require the latest PowerShellGet module.

KarunaPrasad commented 1 year ago

Hi Team,

I have downloaded alpha version of module and Connect-O365Communications cmdlet not populating. And i have tried New-SCSession but it's giving error. Any suggestions would be appreciated.

mattmcnabb commented 1 year ago

@KarunaPrasad New-SCSession no longer exists in the V2 module so Connect-O365ServiceCommunications is the correct command. What version of PowerShell and OS are you using? Are you certain the module is in the correct module directory?

KarunaPrasad commented 1 year ago

@mattmcnabb , i have found that older version of O365ServiceCommunications (1.5) also installed side-by-side. I have uninstalled old version and installed Alpha version. Now it's working. Thank you.

KarunaPrasad commented 1 year ago

@mattmcnabb ,

I was able to connected but when i run the Cmdlets Get-SCService or Get-SCMessage getting below error.:

Invoke-RestMethod : 404 - File or directory not found. Server Error

404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

mattmcnabb commented 1 year ago

Welp! It looks like v2.0 of the API is now deprecated as well! This has now been integrated into the Microsoft Graph API, and as such will have a different base URI and possibly other changes as well. It may take some time for me to look through this and get a new beta to a workable state.

KarunaPrasad commented 1 year ago

Okay. Thank you @mattmcnabb

mattmcnabb commented 1 year ago

@KarunaPrasad This project appears to be superseded by the Microsoft Graph PowerShell SDK found here. In particular, look for the module "Microsoft.Graph.Devices.ServiceAnnouncement" and you'll be able to retrieve the information you need:

image

KarunaPrasad commented 1 year ago

Thank you @mattmcnabb