In today’s article, We will see how to change the license configuration in Dynamics 365 F&O. When the license configuration is on maintenance mode then we cannot change the license configuration however there is an option to make this happen.
Note : While maintenance mode is on, only system administrators and users who have the Maintenance mode user role can sign in to the system
Navigate to System administration > Setup > License configuration
By default, the license configuration is set in maintenance mode.

We can enable or disable license configuration in two ways.
- SQL squery
- Command
SQL query
- Login to the development machine
- Sign in with SSMS as an administrator and switch to the AXDB database, and run the following command.
update SQLSYSTEMVARIABLES SET VALUE = 1 where PARM = 'CONFIGURATIONMODE'
- Restart the World Wide Web Publishing Service and reset IIS.
- After the service is restarted, the system will be in maintenance mode.

- Now, you can enable license key and click on Yes
- When you’ve completed your maintenance mode activities then set the value to 0 and Restart the W3 and reset IIS.
Command
You can turn on maintenance mode locally by running the following command.
J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode true
You can turn off maintenance mode locally by running the following command.
J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode false
After running the command, you will want to restart the World Wide Web Publishing Service to reset IIS. The system will then be out of maintenance mode.
Reference link: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/sysadmin/maintenance-mode
If you like this article, feel free to share it with others who might find it helpful! If you have any questions, feel free to reach out to me.