mattmcnabb / O365ServiceCommunications

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

Problem to login #11

Closed vandreytrindade closed 4 years ago

vandreytrindade commented 4 years ago

Hi!

Today I'm facing this problem with this module:

$Session = New-SCSession -Credential $Cred
Invoke-RestMethod : Sendera:UnauthorizedUnauthorized
No C:\Program Files\WindowsPowerShell\Modules\O365ServiceCommunications\1.5.12\functions\New-SCSession.ps1:60 caractere:22
+         Cookie     = Invoke-RestMethod @Splat | Select-Object -Expand ...
+                      ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
mattmcnabb commented 4 years ago

@vandreytrindade I'm seeing the same thing here. I can do some more digging but I'm thinking that this API might have finally been deprecated.

vandreytrindade commented 4 years ago

@mattmcnabb Oh... So we have to use their solution then? No problem... I liked what you have created here. Good job!

mattmcnabb commented 4 years ago

@vandreytrindade I'm not 100% certain that this is the case, but Microsoft has said this API will be going away since just about the day after they released it 🤣

I documented that in #2 but it has just kept on working so far. And the v2 API is still marked as "Preview" 🤷‍♂

Anyway, I'll see if I can find out whether this API is truly deprecated now. Something like this happened a few years ago and it turns out they had just mis-managed a DNS record or something, and it resolved itself.

vandreytrindade commented 4 years ago

No problem @mattmcnabb, take your time! Thanks for your attention!

mattmcnabb commented 4 years ago

Please see #2 - I am now working on a V2 of this module leveraging the new API. Hopefully this will be done soon!

mattmcnabb commented 4 years ago

@vandreytrindade 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.

vandreytrindade commented 4 years ago

@mattmcnabb Hi! I'm in quarentine at home because of the coronavirus here in Brazil. I won't be able to test it for you at the moment. We stop using the module since Microsoft started sending emails withe the message center. Even so, wish you good luck!

mattmcnabb commented 4 years ago

@vandreytrindade Thanks! I hope everything is well for you. I'll go ahead and close this issue since you may no longer be using this method. However, if you do know anyone who may benefit from this please let them know about V2.

vandreytrindade commented 4 years ago

Will do! Eveything's fine with me, only precaution.