NAV2017 SOAP and OData with Office 365 authentication

Theo_van_de_VenTheo_van_de_Ven Member Posts: 22
edited 2017-02-10 in NAV Three Tier
Hi,

I have a single box Windows Server 2012 server without active directory on it on which I installed NAV 2017. The server is not in a domain.
Created three NAV Server instances as I want to be able to use different kind of authentication methods. Each NAV Server is using another authentication type (Windows, NavUserPassword and Office 365).

Got NAV Windows Client and Web Client running for all three kinds of authentication. Can use them local on the box and outside from the company network.

There are two things that I am struggling with on the Office 365 part of the installation:
1. How can I make use of SOAP and OData using Office 365 authentication? Do I have to change the authentication to OAuth? If yes, how do I do that? Is there a good explanation of walk through somebody knows of? I cannot find it.

2. If I start Outlook I can see some buttons in the ribbon that enable me to create a new Order of Invoice in NAV. If I click on it sometimes I have to refresh the page, then it prompts me for signing in and after having done that it starts the NAV web client. I expected it to open the page for creating the new NAV document I wanted but instead it just opens the default role center that has been setup. Is this normal behaviour or do I need to setup something more?

Any help is apreciated!
Theo van de Ven
Technical Consultant | System Administrator

Rainbow Crossmedia BV
Bosmanskamp 63
4191MT Geldermalsen

Best Answers

  • Theo_van_de_VenTheo_van_de_Ven Member Posts: 22
    Answer ✓
    Update: The Dynamics NAV buttons in Outlook now work normally.

    What did I do:
    1. Under the ProgramData folder there is a folder for each Web Client website that was created. Deeper down the folder structure there is a folder named 'ExtractedResources'. I needed to add the 'IIS_IUSRS' group and grant it Modify rights.
    2. After being sure that all base URL's on the Nav Servers are set correctly (using the public available FQDN and public TCP port) I ran the assisted setup again as administrator of the Office 365 account and I chose the option to set it up for the company (not only my mailbox).

    Now that I am able to test it and it seems to work normally, that is if I enter an email address of a contact that exists in the NAV database in the Company being used, I am able to see some statistics of this contact and I can create a new quote, order or invoice and edit the values directly from Outlook without having to open the Dynamics NAV 2017 Windows Client of Web Client.

    I noticed after switching to another Office 365 account that each Office 365 account can have another NAV database Company active in its connection with the NAV database. But I couldn't find how to change to another NAV database Company from within Outlook.

    So if I login to Office 365 using account1@sometenant.onmicrosoft.com and start Outlook it is possible that the Outlook integration to the Dynamics NAV database is using 'Company XYZ' and if I login to Office 365 using account2@sometenant.onmicrosoft.com and start Outlook that it is using 'Company ABC'.

    If I write a new email to an email account the Outlook integration will try to find the email address at contacts from the NAV database Company it is connected to. It is possible that the email account only exists in the Company I am not connected to. How can I change the current used Company by Outlook integration? Couldn't find an instruction for that.
    Theo van de Ven
    Technical Consultant | System Administrator

    Rainbow Crossmedia BV
    Bosmanskamp 63
    4191MT Geldermalsen
  • Theo_van_de_VenTheo_van_de_Ven Member Posts: 22
    edited 2017-02-12 Answer ✓
    Update2: explanation about how to change the NAV Company being used by the Outlook Integration.

    I was searching for some kind of Setting in Outlook, the Office 365 portal and in NAV 2017 about how to change the NAV Company being used in the Outlook Integration. The answer is: there isn't a setting for that!

    If you want to change the NAV Company being used by the Outlook Integration you need to
    1. Change the company in your NAV Windows Client to the Company desired and close the NAV Windows Client.
    2. Then you need to start the NAV Web Client, it will use the Company used when closing the NAV Windows Client in the previous step. NAV now remembers the NAV Company used the last time you closed the NAV Web Client.
    3. Restart Outlook. Now Outlook will be using the NAV Company desired.

    Remark: make sure you are using the NAV Windows Client and NAV Web Client using Office 365 authentication!

    Remark: I tried to change the NAV Company being used by adding the Company in the URL on the Web Client only and starting the NAV Web Client against the desired company but the IIS website of the Web Client then gets unstable when trying to connect from Outlook. I needed to restart the IIS website before it started working again!
    Theo van de Ven
    Technical Consultant | System Administrator

    Rainbow Crossmedia BV
    Bosmanskamp 63
    4191MT Geldermalsen

Answers

  • Theo_van_de_VenTheo_van_de_Ven Member Posts: 22
    Answer ✓
    Update: The Dynamics NAV buttons in Outlook now work normally.

    What did I do:
    1. Under the ProgramData folder there is a folder for each Web Client website that was created. Deeper down the folder structure there is a folder named 'ExtractedResources'. I needed to add the 'IIS_IUSRS' group and grant it Modify rights.
    2. After being sure that all base URL's on the Nav Servers are set correctly (using the public available FQDN and public TCP port) I ran the assisted setup again as administrator of the Office 365 account and I chose the option to set it up for the company (not only my mailbox).

    Now that I am able to test it and it seems to work normally, that is if I enter an email address of a contact that exists in the NAV database in the Company being used, I am able to see some statistics of this contact and I can create a new quote, order or invoice and edit the values directly from Outlook without having to open the Dynamics NAV 2017 Windows Client of Web Client.

    I noticed after switching to another Office 365 account that each Office 365 account can have another NAV database Company active in its connection with the NAV database. But I couldn't find how to change to another NAV database Company from within Outlook.

    So if I login to Office 365 using account1@sometenant.onmicrosoft.com and start Outlook it is possible that the Outlook integration to the Dynamics NAV database is using 'Company XYZ' and if I login to Office 365 using account2@sometenant.onmicrosoft.com and start Outlook that it is using 'Company ABC'.

    If I write a new email to an email account the Outlook integration will try to find the email address at contacts from the NAV database Company it is connected to. It is possible that the email account only exists in the Company I am not connected to. How can I change the current used Company by Outlook integration? Couldn't find an instruction for that.
    Theo van de Ven
    Technical Consultant | System Administrator

    Rainbow Crossmedia BV
    Bosmanskamp 63
    4191MT Geldermalsen
  • Theo_van_de_VenTheo_van_de_Ven Member Posts: 22
    edited 2017-02-12 Answer ✓
    Update2: explanation about how to change the NAV Company being used by the Outlook Integration.

    I was searching for some kind of Setting in Outlook, the Office 365 portal and in NAV 2017 about how to change the NAV Company being used in the Outlook Integration. The answer is: there isn't a setting for that!

    If you want to change the NAV Company being used by the Outlook Integration you need to
    1. Change the company in your NAV Windows Client to the Company desired and close the NAV Windows Client.
    2. Then you need to start the NAV Web Client, it will use the Company used when closing the NAV Windows Client in the previous step. NAV now remembers the NAV Company used the last time you closed the NAV Web Client.
    3. Restart Outlook. Now Outlook will be using the NAV Company desired.

    Remark: make sure you are using the NAV Windows Client and NAV Web Client using Office 365 authentication!

    Remark: I tried to change the NAV Company being used by adding the Company in the URL on the Web Client only and starting the NAV Web Client against the desired company but the IIS website of the Web Client then gets unstable when trying to connect from Outlook. I needed to restart the IIS website before it started working again!
    Theo van de Ven
    Technical Consultant | System Administrator

    Rainbow Crossmedia BV
    Bosmanskamp 63
    4191MT Geldermalsen
  • Theo_van_de_VenTheo_van_de_Ven Member Posts: 22
    Question that is still open: How can I make use of SOAP and OData using Office 365 authentication? Do I have to change the authentication to OAuth? If yes, how do I do that? Is there a good explanation of walk through somebody knows of? I cannot find it.
    Theo van de Ven
    Technical Consultant | System Administrator

    Rainbow Crossmedia BV
    Bosmanskamp 63
    4191MT Geldermalsen
  • HannesHolstHannesHolst Member Posts: 119
    @Theo_van_de_Ven

    I've made a similar request to our partner for our NAV2017-installation. They didn't answer directly, but as a solution they proposed to create WebService Keys for each user.

    BUT, in the latest JetExpress-Version you are able to select "Office 365 authentication" when connecting to NAV using WebService-method.

    If you found something, please let me know. I'm interested.

    Cheers,
Sign In or Register to comment.