2015-10-05 50 views
0

我已經使用ADAL JS創建日曆應用程序(讀寫)。我已經在https://manage.windowsazure.com/註冊了應用程序,併成功地添加了Oauth2進行登錄,閱讀日曆活動。無法通過AngularJS在Office365 API中創建/ POST事件 - ADAL JS

但我不能爲事件做POST請求。它會拋出400錯誤。

我做了post請求enter image description here

這是結果:

enter image description here

我已經做了AAD許可Calendar.ReadWrite。

enter image description here

我可能會丟失嗎?

+0

權限似乎是正確的。你可以給我們發送請求和響應頭文件,以便重新使用嗎?這個問題與支持單頁面應用程序的CORS相關,比如你的。 –

+0

Venkat,我在這裏發佈了網絡標題信息。 http://imgur.com/gallery/t4jbeiF/new –

回答

0

我得到了答案。所以POST請求所需的日期格式是罪魁禍首。我用「YYYY-MM-DDThh:mm:ss」格式將「開始/結束」數據作爲簡單日期。

enter image description here

因爲這個瀏覽器的扔「訪問控制允許來源」錯誤,而讓錯誤的信息。我不得不使用FIDDLER來跟蹤請求/響應。

我不得不這樣做轉換使用此日期字符串ISO字符串(請參閱開始和結束屬性) enter image description here