1

I am trying to use Office365 APIs in provider hosted app. I created a basic project and when I debug it, it runs perfectly in my local system. After that I hosted it in my Azure website (following Kirk Evans Blog). But now it is giving me Bad Request error when I am accessing it from my Office365 SP developer site.

Any help?

Edit: The app is created using MVC. When we add Office365 API in our project a controller Office365CommonController is added by default. My azure web site is saying https://{sitename}.azurewebsites.net/Office365Common is not valid

It works fine in local host.

Edit: When we add O365 APIs in our MVC project another client id gets created

<add key="ida:ClientID" value="" />

<add key="ida:Password" value="" />

Should we use this client id and password when we register our app on SP or generate a new one?

1

It looks like you need to update the redirect URI for your Office 365 application. When you are debugging locally, it will be localhost but when you publish the web application, you will need to modify/add redirect URI that matches your website URL. The tooling currently dfo

Also, I see that you are using Office 365 APIs in a provider-hosted app for SharePoint. While this will theoretically work, the SharePoint app registration, auth flow are different to that of Office 365 APIs. They will essentially be two different applications today (until app for SharePoint is also backed with the same AAD auth flow)

Let me know if you have any questions.

  • Tried changing redirect URI too, but same issue. Will wait for SP updates :) – Garima May 16 '14 at 4:29
  • Hi Chakkaradeep, I know it been a long time but do you have any further updates on this? Can we use O365 APIs in provider hosted app now? – Garima Jul 8 '15 at 10:25
-1

Thanks for the question. I have passed this to my team. I will update this once I have some info.

Thanks, Chaks (MSFT) Program Manager, Office 365 API Tooling

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.