PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

I've got an 403 Error as result

Open FlorianSLZ opened this issue 6 years ago • 7 comments

FlorianSLZ avatar Jan 16 '19 09:01 FlorianSLZ

Having the same issue as of today. InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Get-O365CalendarEvent], WebException

msmustamandi avatar Jan 16 '19 16:01 msmustamandi

Looks like Basic Authentication with api v1.0 is the problem.

msmustamandi avatar Jan 16 '19 17:01 msmustamandi

I have the same behavior with API v2.0 Do you have any idea how to solve the problem?

FlorianSLZ avatar Jan 17 '19 07:01 FlorianSLZ

I changed my script to use EWS for now until I can figure out how to use OAuth and Graph.

On Thu, Jan 17, 2019 at 2:36 AM flslz [email protected] wrote:

I have the same behavior with API v2.0 Do you have any idea how to solve the problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lazywinadmin/PowerShell/issues/13#issuecomment-455071336, or mute the thread https://github.com/notifications/unsubscribe-auth/AmgCqT45DX6zOMA8xbuMsFB_eSmkkW8Jks5vECf1gaJpZM4aCmeq .

msmustamandi avatar Jan 17 '19 13:01 msmustamandi

v1.0 "Basic Authentication for Outlook REST API is no longer supported" (403) Forbidden v2.0 "Authentication for this API version requires OAuth." (403) Forbidden

How do we fix this?

ValuePy avatar Jan 18 '19 19:01 ValuePy

With this article I'm able to get the AuthToken, but my knowledge is not enough to get it work with the Invoke-RestMethod. May one of you can figure out how.

https://www.thelazyadministrator.com/2018/03/20/connect-to-the-microsoft-graph-api-with-powershell/

FlorianSLZ avatar Jan 28 '19 15:01 FlorianSLZ

I have the same with api V2.0

Someone can help me to fix the script?

Thanks in advance

FlyeZz avatar Feb 05 '19 11:02 FlyeZz