locked
Apps for Office and ProjectData API RRS feed

  • Question

  • Hello,

    I might be missing something about apps for Office but I would like to understand something.

    So I have been developing an app for Office in the last weeks based on the different samples of the Project 2013 SDK. In the app, I get the data with OData from the PWA instance the user is connected to.

    Knowing an app for Office is pure Web (Html + JS + CSS) and that it is hosted on the developer server (let's say toto.com),

    How can an App for Office even access data from an end user PWA that is local to its domain that is very rarely published to the internet ?

    Very few companies publish their PWA instances so I don't understand how this system could work (using OAuth or not).

    If anybody from Microsoft sees this message, please answer me.

    Thanks,

    Thomas.


    Tuesday, April 23, 2013 3:08 PM

Answers

  • Hi Thomas.

    This is a follow up to our discussion which started on my blog. (Link)

    If I understand you correctly, you want to publish an App on the Office Store which can access data on a specific Project Server instance where the Project Server is not necessarily in the same domain and network as the calling Project Pro client with the installed app in it.

    What you already know and have:

    • A working app, if Project Server, the app-host and the Project Pro client are in the same domain and network.
    • A working app, if Project Server, the app-host and the Project Pro client are reachable via the same network but use different domains or if the app is hosted on a different IIS server. (You can connect to the Project Server API via cross domain AJAX queries.)
    • A way to distribute the app.

    What is missing:

    • A way to connect to the the Project Server API when the Project Pro client (with the app in it) and the Project Server are on different networks.

    In this case you would indeed need the help of the IT department that is hosting the Project Server. It would be necessary to provide a way to connect the machine that is running the Project Pro client to the Project Pro sever (for example via a VPN connection or a Proxy / Firewall rule). For example FUAG could be an enabling solution here.

    The Office App Model doesn’t provide an out of the box solution for this problem and it is a common problem for every client development.

    I hope this helps. Please explain in more detail if I still got you wrong.

    - Christian

    Tuesday, April 23, 2013 11:10 PM
  • With "cross domain AJAX queries" it should not matter if the app is on the internet and the Project Server is on the intranet. 

    This functionality enables the embedded browser in your Project client to make REST API calls from one domain (where your app is hosted) to the other domain (where the Project API is hosted).

    The two servers, your app host on the internet and the Project server on the intranet, do not need to have a direct connection with each other. The user with his client is the bridge between the servers. 

    As long as the user with his or her Project client can reach both (the app and the Project Server) from his current network connection (e.g. within his company or when connected via VPN), the app will work.

    • Marked as answer by Quist Zhang Thursday, May 2, 2013 1:02 PM
    Wednesday, April 24, 2013 9:38 AM

All replies

  • Hi Thomas.

    This is a follow up to our discussion which started on my blog. (Link)

    If I understand you correctly, you want to publish an App on the Office Store which can access data on a specific Project Server instance where the Project Server is not necessarily in the same domain and network as the calling Project Pro client with the installed app in it.

    What you already know and have:

    • A working app, if Project Server, the app-host and the Project Pro client are in the same domain and network.
    • A working app, if Project Server, the app-host and the Project Pro client are reachable via the same network but use different domains or if the app is hosted on a different IIS server. (You can connect to the Project Server API via cross domain AJAX queries.)
    • A way to distribute the app.

    What is missing:

    • A way to connect to the the Project Server API when the Project Pro client (with the app in it) and the Project Server are on different networks.

    In this case you would indeed need the help of the IT department that is hosting the Project Server. It would be necessary to provide a way to connect the machine that is running the Project Pro client to the Project Pro sever (for example via a VPN connection or a Proxy / Firewall rule). For example FUAG could be an enabling solution here.

    The Office App Model doesn’t provide an out of the box solution for this problem and it is a common problem for every client development.

    I hope this helps. Please explain in more detail if I still got you wrong.

    - Christian

    Tuesday, April 23, 2013 11:10 PM
  • What you already know and have:

    • A working app, if Project Server, the app-host and the Project Pro client are in the same domain and network.
    • A working app, if Project Server, the app-host and the Project Pro client are reachable via the same network but use different domains or if the app is hosted on a different IIS server. (You can connect to the Project Server API via cross domain AJAX queries.)
    • A way to distribute the app.

    What is missing:

    • A way to connect to the the Project Server API when the Project Pro client (with the app in it) and the Project Server are on different networks.

    Well, when an user opens Project Pro, he chooses what Project Server Instance he wants (unless he works locally but this isn't the target here) so the Project Server API and Project Pro are linked. But because Apps for Office are IFrames, the App and the Project Server API are on a different domains and worse, the Project Server API is on an intranet while the App is on the Internet.

    So the App can't reach an Intranet Instance but this is the use case in 95% of companies with Project Server instances. Companies rarely publish their instances on the Internet.

    In this case you would indeed need the help of the IT department that is hosting the Project Server. It would be necessary to provide a way to connect the machine that is running the Project Pro client to the Project Pro sever (for example via a VPN connection or a Proxy / Firewall rule). For example FUAG could be an enabling solution here.

    I don't have any impact on what companies or users will do on their servers and I can't make them change their configurations (with FUAG for example).

    The main point of an App is its simplicity of installation compared to installing wsp. You just go to the office store, accept the app and you have it in Project Pro (or another Office software). If they have to change their server config, publish their instances, use VPN or something like that, nobody will install any app.

    On paper, Apps seem like a great idea but I think it is the opposite (way limited compared to VSTOs, limited to front end, obligation for the user to publish every time to see the changes because the Project Data Api is getting the data from the Reporting db).

    I don't know if you have the answer to my problem and I really appreciate your help and your time.

    Thomas.

    Wednesday, April 24, 2013 9:24 AM
  • With "cross domain AJAX queries" it should not matter if the app is on the internet and the Project Server is on the intranet. 

    This functionality enables the embedded browser in your Project client to make REST API calls from one domain (where your app is hosted) to the other domain (where the Project API is hosted).

    The two servers, your app host on the internet and the Project server on the intranet, do not need to have a direct connection with each other. The user with his client is the bridge between the servers. 

    As long as the user with his or her Project client can reach both (the app and the Project Server) from his current network connection (e.g. within his company or when connected via VPN), the app will work.

    • Marked as answer by Quist Zhang Thursday, May 2, 2013 1:02 PM
    Wednesday, April 24, 2013 9:38 AM
  • Ok I guess you're right.

    What is weird is, when I try to access the Project Data API in an app uploaded on a IIS in my domain the cross domain queries work. When the app is hosted totally on another domain, I have got an access denied with XMLHttpRequest.

    If I use JQuery Ajax with jsonp as datatype (as advised by MS to do cross domain) the callback function isn't fired . I have tried a lot of options provided on forums but haven't been able to make it work.

    Any lead ?

    Wednesday, April 24, 2013 3:38 PM
  • I have created a new thread focused on the ajax call and the error I have. If you have any idea, you are more than welcome to help on this part too : http://social.msdn.microsoft.com/Forums/en-US/appsforoffice/thread/29ddbcce-5a25-494a-8c25-95e6ab26fb7d :-)

    Wednesday, April 24, 2013 4:43 PM