🧠 Why You Might Need This?
Sometimes in Dynamics 365 Finance & Operations (D365FO), you need to troubleshoot data issues in a TEST or UAT environment using your local DEV VM. You can’t just directly access these databases—but Microsoft provides a secure way to request Just-In-Time (JIT) access using LCS.
This process enables you to:
-
Investigate complex data-related bugs
-
Reproduce TEST/UAT issues in DEV
-
Access remote environments securely for a limited time (usually 8 hours)
🔐 Step 1: Requesting JIT Access from LCS
-
Log into LCS (Lifecycle Services).
-
Select the target TEST/UAT environment.
-
Go to the Maintain > Enable Database Access section.
-
Add your Dev VM's public IP to the firewall whitelist.
-
Confirm to enable JIT access.
⏰ You’ll receive an expiry notice (usually valid for 8 hours).
🎯 Step 2: Request SQL Login Credentials
-
In the same LCS page, scroll to Database accounts.
-
Select "Troubleshooting tuning for AX" as your reason.
-
Provide your justification and request access.
-
Refresh the page after submission.
✅ You’ll get:
-
SQL Server Name
-
Database Name
-
Login Username
-
Login Password
💻 Step 3: Connect from SQL Server Management Studio (SSMS)
Using the above credentials:
-
Open SSMS on your Dev VM.
-
Choose SQL Authentication, not Windows.
-
Paste the JIT credentials.
👤 Step 4: Create Debug SQL User (Optional but Recommended)
You can optionally create a new SQL user for debugging using the following script:
This ensures isolation and easy revocation post-debugging.
⚙️ Step 5: Modify web.config
in AOS Service
-
Stop the following services before changing config:
-
IIS
-
World Wide Web Publishing
-
Microsoft Dynamics 365 Batch Management Service
-
Microsoft Dynamics 365 Data Import Export Framework (DIXF)
-
-
Locate and backup your current
web.config
:-
Path:
K:\AOSService\WebRoot\web.config
-
-
Edit the below keys in the file:
-
Restart IIS and services after saving the file.
🔍 Verify the Connection
-
Open the Dev VM URL.
-
Navigate to:
System Administration → Inquiries → Database → Database Information
-
Check if the database name matches the TEST/UAT database.
If yes, you’re now officially connected and ready to debug LIVE TEST data securely.
🛡️ Important Safety Tips
🔒 Best Practice | ✅ Recommendation |
---|---|
Version Match | Dev VM and TEST/UAT must be on the same version |
Code Sync | Ensure build + sync before connecting |
No DB Sync | Never run DB sync in Dev while connected to TEST |
Revert Changes | Restore original web.config after use |
8-Hour Limit | After expiry, reapply JIT access if needed |
📌 Summary
Just-In-Time access through LCS is a powerful feature when you need to securely connect to TEST/UAT environments for debugging in D365FO. Always follow safety best practices and never forget to revert your environment setup post-debugging.
0 Comments