Files
2025-04-30 15:05:58 +02:00

11 KiB

Microsoft Rewards Automation Script

GitHub License Website

A sophisticated, feature-rich automation script for Microsoft Rewards, built with TypeScript, Cheerio, and Playwright. This script automates the process of earning Microsoft Rewards points by completing various activities including searches, quizzes, polls, and more.

Project Website: https://msrewards-script.com

Table of Contents

Features

  • Multi-Account Support: Run multiple Microsoft accounts sequentially or in parallel
  • Authentication Support: Works with standard login, 2FA, and passwordless authentication
  • Search Automation: Completes desktop and mobile search requirements
  • Activity Completion:
    • Daily set tasks
    • Promotional activities
    • Various quiz types (Multiple choice, This-or-That, ABC)
    • Polls and click rewards
    • Punchcards
    • Daily check-in and Read-to-Earn activities
  • Advanced Browsing Simulation:
    • Realistic scrolling behavior
    • Random result clicking
    • Configurable delays between actions
  • Infrastructure:
    • Session persistence between runs
    • Docker support with scheduling
    • Proxy configuration options
    • Discord webhook integration for notifications
    • Clustering for handling multiple accounts efficiently

Prerequisites

  • Node.js 14+ and npm
  • Docker (optional, for containerized deployment)
  • Microsoft Rewards account(s)

Installation

  1. Clone or download the repository:
git clone https://github.com/yourusername/Microsoft-Rewards-Script.git
cd Microsoft-Rewards-Script
  1. Install dependencies:
npm install
  1. Create configuration files:
cp accounts.example.json accounts.json
  1. Edit the accounts.json file with your Microsoft account details.

  2. Build the project:

npm run build

Configuration

Config File Options

Setting Description Default
baseURL Microsoft Rewards homepage URL https://rewards.bing.com
sessionPath Directory to store sessions and fingerprints sessions
headless Run browsers invisibly in the background false (browser is visible)
parallel Run mobile and desktop tasks simultaneously true
runOnZeroPoints Run script even when no points can be earned false
clusters Number of simultaneous browser instances 1
saveFingerprint.mobile Reuse the same fingerprint for mobile browsing false
saveFingerprint.desktop Reuse the same fingerprint for desktop browsing false
workers.doDailySet Complete daily set activities true
workers.doMorePromotions Complete promotional activities true
workers.doPunchCards Complete punchcard activities true
workers.doDesktopSearch Complete desktop search requirements true
workers.doMobileSearch Complete mobile search requirements true
workers.doDailyCheckIn Complete daily check-in activity true
workers.doReadToEarn Complete read-to-earn activity true
searchOnBingLocalQueries Use local queries instead of fetching from repo false
globalTimeout Default timeout for operations 30s
searchSettings.useGeoLocaleQueries Generate queries based on geo-location false (uses EN-US)
searchSettings.scrollRandomResults Randomly scroll in search results true
searchSettings.clickRandomResults Visit random websites from search results true
searchSettings.searchDelay Minimum and maximum delay between searches min: 3min, max: 5min
searchSettings.retryMobileSearchAmount Retry attempts for mobile searches 2
logExcludeFunc Functions to exclude from logs SEARCH-CLOSE-TABS
webhookLogExcludeFunc Functions to exclude from webhook logs SEARCH-CLOSE-TABS
proxy.proxyGoogleTrends Route Google Trends requests through proxy true
proxy.proxyBingTerms Route Bing terms requests through proxy true
webhook.enabled Enable Discord webhook notifications false
webhook.url Discord webhook URL null

Account Setup

Edit the accounts.json file with your Microsoft account information:

[
  {
    "username": "your-email@example.com",
    "password": "your-password",
    "proxy": {
      "url": "http://proxy-url.com",
      "port": "8080",
      "username": "proxy-username",
      "password": "proxy-password"
    }
  }
]

Note: The proxy configuration is optional.

Usage

Basic Usage

After installing and configuring the script, you can run it with:

npm run start

Docker Usage

Prerequisites

  • Docker and Docker Compose installed
  • Basic understanding of Docker and containers

Setup Steps

  1. Prepare Your Environment

    • If you've run the script locally before, remove the /node_modules and /dist folders
    • If upgrading from an older Docker version, remove any persistent config.json and session folders
  2. Configure Docker

    Edit the compose.yaml file to customize:

    • Timezone via the TZ environment variable
    • Persistent storage mappings for configuration and session data
    • Cron schedule for automatic execution using CRON_SCHEDULE (use crontab.guru for help)
    • Set RUN_ON_START=true to execute immediately on container start
  3. Start the Container

    docker compose up -d
    
  4. Monitor Execution

    docker logs microsoft-rewards-script
    

    This command shows execution logs and any passwordless login codes.

Advanced Features

Proxy Support

The script supports using proxies for individual accounts. Configure in each account entry:

"proxy": {
  "url": "http://your-proxy-server.com",
  "port": "8080",
  "username": "proxy-username",
  "password": "proxy-password"
}

You can also configure which requests should be proxied in the config.json file.

Session Management

Sessions are stored in the directory specified by sessionPath in your config. This helps:

  • Reduce login frequency
  • Preserve authentication across script runs
  • Maintain consistent browser fingerprints if enabled

Webhook Integration

Configure Discord webhook notifications by updating the webhook settings in config.json:

"webhook": {
  "enabled": true,
  "url": "https://discord.com/api/webhooks/your-webhook-url"
}

Troubleshooting

  • Lingering Chrome Instances: If you terminate the script without properly closing browser windows, Chrome instances may remain running. To clean up:

    • Windows: Run npm run kill-chrome-win
    • Linux/Mac: Use pkill -f "chrome"
  • Login Issues: If you experience login problems:

    • Delete session data in your configured sessions folder
    • Verify account credentials
    • Check if your account requires additional security verification
  • Zero Points Error: If the script exits with a "0 points can be earned" message:

    • Set "runOnZeroPoints": true to force execution
    • Check if you've already completed your daily tasks
    • Verify that your account has access to Microsoft Rewards

Best Practices

  • Run Frequency: Configure to run 1-2 times per day for best results
  • Browser Visibility: For troubleshooting, set headless: false to observe the automation
  • Account Safety: Avoid running too many accounts from the same IP address
  • Delays: The default search delays are designed to mimic human behavior; extreme changes might increase detection risk

Disclaimer

USE AT YOUR OWN RISK: This script is provided for educational purposes only. Using automation scripts violates Microsoft Rewards' terms of service and may result in account suspension or banning. The developers are not responsible for any consequences of using this script.


This project is not affiliated with Microsoft or Microsoft Rewards.