Friday, August 30, 2024

Dual-write setup from Lifecycle Services fails at Application step

If you receive the issue with applying Dual-write for your D365FO environment following the standard procedure, you may need just to change one database parameter.



 Open SQL MS and switch this flip to True and keep default values for your database.


Now you can resume the process.

How to get back Import users button in D365FO

 

 You may start experiencing the following issue with button Import users.


It happens because Microsoft changed their approach to devboxes settings:

As of November 15, 2023, certificates in your Microsoft Entra tenant are no longer installed in new one-box development environments by default. 

You can find more detail on how to install a certificate in this article, but we can use a shortcut using 
D365fo.tools.

Here are the steps:
    

   1) Go to Azure portal and select app registration and create a new one (name the app to be the same as the environment name & leave settings at default) 

   2) The app registration needs to have the following: 

       a) 2 reply URLs > https://<fno-url> & https://<fno-url>/oauth 

       b) add the following API permissions to the App registration: 



Grant above permissions.

3) On the VM for the environment, open PowerShell 

   4) Run the following commands: 

        a) Install-Module D365fo.tools, and accept all the prompts 

        b) New-D365EntraIntegration -ClientId <client-id> (client-id is the app registration id that was created) 

   5) The above command will save a certificate, which then needs to be uploaded to the app registration that was created 

 






Monday, August 12, 2024

How to fix Admin account after refreshing data base in your dev box

 If you refresh your devbox database from another environment and need to set up its admin account to your user, you can do it by executing the following SQL command.


update USERINFO 
set NAME = 'Admin', 
    NETWORKDOMAIN ='https://sts.windows.net/', 
    NETWORKALIAS = 'a.voytsekhovskiy@mydomain.net', 
    ENABLE = 1, 
    SID = 'S-1-19-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX', 
    IDENTITYPROVIDER ='https://sts.windows.net/'
where ID = 'ADMIN'

NB: use your own email address and SID.