d365collaborative / d365fo.tools

Tools used for Dynamics 365 Finance and Operations
MIT License
250 stars 102 forks source link

Rename-D365Instance use Office Add-in issue #697

Closed lhorvath75 closed 1 year ago

lhorvath75 commented 1 year ago

Hi,

For development and testing, the 10.0.24 developer VHD was used in the local environment.

Example: https://usnconeboxax1aos.cloud.onebox.dynamics.com/

  1. I export customers from D365 FnO (also for other exports) to excel (Open In Excel). I edit it in Excel and upload it back using the Microsoft Dynamics Office Add-in. Login to Office-Add is successful and upload is successful.

Example: https://dax-szrt-devhl.cloud.onebox.dynamics.com/

  1. I renamed the instance with d365fo.tools (Rename-D365Instance -NewName dax-szrt-devhl) D365 FnO is working and I exported excel again. I edit it in Excel and upload it using Office-Addin, but I get the following error is sign in process

500011 - [2022-11-25 09:56:21Z]: AADSTS500011: The resource named dax-szrt-devhl.cloud.onebox.dynamics.com is not found in the tenant named DAX This can happen if the application was not installed by the tenant administrator or if none of the users in the tenant contributed. You may have sent the authentication request to the wrong tenant. Tracking ID: 7efd2044-2f4e-4168-bbca-7305f5988400 Correlation ID: 3e2db1e7-5bb6-4db6-bdc2-58a43bae3727 Timestamp: 2022-11-25 09:56:21Z - Correlation ID: 3e2db1e7-5bb6-4db6-bdc2-58a43bae3727 - Trace ID: 7efd2044-2f4e-4168-bbca-7884005

Thank you in advance for your help.

Best regards: László 2022-11-25_11-05-54

FH-Inway commented 1 year ago

Thanks for reporting. Did you try the rename with a name that does not contain special symbols like the - symbol? Just a wild guess on my part, but since the error message mentions a tenant named DAX (which is the first part before the - symbol in dax-szrt-devhl), it may be that not all components support names with special symbols.

There is also a similar issue #273

lhorvath75 commented 1 year ago

Hi,

I renamed the instance to https://daxszrtdevhl.cloud.onebox.dynamics.com, but unfortunately the error still occurs.

Thank you in advance for any further help

Best regards, László

2022-11-29_12-06-42

Splaxi commented 1 year ago

Onebox VHD (Local Devbox) is a special kind of creature.

Please note that the url / domain is read from the right to the left - this is the way that DNS resolving works:

com -> dynamics -> onebox -> cloud -> daxszrtdevhl

.com is a Top Level Domain, so the real domain name is: dynamics.com

So Microsoft has pre-registered the usnconeboxax1aos name, within their own multi-leveled public DNS configuration.

It the very second that you rename your machine - you loose everything that depends on the https://usnconeboxax1aos.cloud.onebox.dynamics.com

You might be able to dig into the dirty details on how it is configured, you might also be able to work with some local hosts files and stuff like that.

But you are WAY beyond what Microsoft envisions should happen with an Onebox VHD - is you want custom names AND have OAuth 2.0 working - You need to roll with Cloud Hosted Environments, deployed from an active LCS Project.

FH-Inway commented 1 year ago

@lhorvath75 You may be interested in https://erconsult.eu/wp-content/uploads/2018/02/expose-a-dynamics-365-for-finance-and-operations-onebox-on-a-custom-public-domain.pdf

FH-Inway commented 1 year ago

@Splaxi Do you want to keep this open or can it be closed? @lhorvath75 Feel free to provide further information or thoughts on how we can help with this.