Microsoft Token Expired — Action Required

The sync has stopped because the Microsoft authentication token has expired. This happens every 60 days and takes 2 minutes to fix.


Run this command on the VPS server:

cd /var/www/planner-netsuite-sync-v2 && node scripts/getToken.js


Then open the URL shown, enter the code, and sign in as sagar.pasrija@trimaster222.onmicrosoft.com. The sync will resume automatically.

Dashboard
Overview of all sync projects
⚠ Microsoft Token Expired
The sync has stopped working. To fix, run this command on the server:
cd /var/www/planner-netsuite-sync-v2 && node scripts/getToken.js
Then open the URL shown, enter the code, and sign in with sagar's account.
Active Projects
Last Sync
Server Status
Checking...
Projects

No projects yet. Add your first project to begin syncing.

Quick Actions
All Projects
Manage Planner to NetSuite connections

No projects yet.

Credentials
Microsoft and NetSuite authentication settings
Note: These are stored in data/credentials.json and .env on the server. Keep this page private.
Microsoft Azure App
OAuth Device Code Flow — set up once
One-time
Azure Portal → App Registrations → Application (client) ID
Azure Portal → Certificates & secrets → Value
NetSuite OAuth 1.0a
Token-Based Authentication — set up once
One-time
Uppercase with underscore e.g. 6688197_SB1
Microsoft Token Refresh
Required every ~60 days. When sync stops working with an auth error, run this command on the server and sign in:
cd /var/www/planner-netsuite-sync-v2 node scripts/getToken.js
Open the URL shown → enter the code → sign in as sagar.pasrija@trimaster222.onmicrosoft.com
Sync Logs
Real-time sync activity
⚠ Token Expired — Sync Not Working
Run on the server: node scripts/getToken.js then sign in with sagar's account.
Activity Log
Loading...
Useful Server Commands
Check if sync is running
pm2 status pm2 logs planner-sync-v2 --lines 20 --nostream
Restart sync
pm2 restart planner-sync-v2 --update-env
Refresh Microsoft token (every 60 days)
node scripts/getToken.js
Setup Guide
Step by step instructions
Adding a New Project
First-time VPS Setup
Token Refresh
Troubleshooting
Before you start: Credentials must be saved and Microsoft token must be valid.
1
Find your Planner Plan ID and Tenant ID
Open your Planner plan in the browser. Look at the URL:

Plan ID = part after /plan/
Tenant ID = part after ?tid=
https://planner.cloud.microsoft/webui/plan/PLAN_ID_HERE/view/grid?tid=TENANT_ID_HERE
2
Find your NetSuite Project Internal ID
Open your project in NetSuite. The number after id= in the URL is your Project ID.
https://XXXXX.app.netsuite.com/app/accounting/project/project.nl?id=667578
3
Click "New Project" in this dashboard
Fill in the project name, Plan ID, Tenant ID, and NetSuite Project ID. Set status to Active. Click Save.
4
Click "Setup Project" on the project card
This will automatically:
— Read all tasks from your Planner plan
— Create any missing tasks in NetSuite
— Map all tasks between both systems
— Start syncing dates every 60 seconds
5
Verify it works
Change a task date in Planner. Wait 60 seconds. Open NetSuite — the date should match exactly.