# Session Log — Saguaro MSP360 Deletion

## User
- **User:** Mike Swanson (mike)
- **Machine:** GURU-BEAST-ROG
- **Role:** admin

## Session Summary

Mike requested deletion of Saguaro Conveyor Equipment machines from MSP360 mspbackups via Discord. The request was made in the #admin-chat Discord channel.

Initial research confirmed that "mspbackups" refers to the MSP360 Managed Backup Service integrated with GuruRMM. The MSP360 API was queried using credentials from the vault (`msp-tools/msp360-api.sops.yaml`). Authentication was performed via `POST /api/Provider/Login`, returning a bearer token.

The `/api/Monitoring` endpoint was used to enumerate all backup entries, which revealed 4 plan entries across 3 unique machines all under the company name "Saguaro Conveyor Equipment": DESKTOP-DGM4C1T, DESKTOP-L0U6QUN, and SC-SERVER. The `/api/Users` endpoint confirmed the corresponding user IDs and storage consumption (~417 GB total). Mike confirmed deletion of both the accounts and the stored backup data.

All 3 users were deleted via `DELETE /api/Users/{id}?deleteUserData=true`, each returning HTTP 200. Saguaro Conveyor Equipment is fully removed from MSP360.

## Key Decisions

- Used `deleteUserData=true` query parameter on the delete call — Mike explicitly confirmed data should be deleted along with the accounts, not just the licenses.
- Targeted deletion by UserID (from `/api/Users`) rather than ComputerHid — the Users endpoint is the authoritative resource for account-level deletion in the MSP360 API.
- No Syncro ticket created per Mike's direction.

## Problems Encountered

- The GuruRMM mspbackups client code (`client.rs`) only implements monitoring endpoints — no delete capability. Deletion was performed directly against the MSP360 REST API rather than through the GuruRMM integration layer.
- The `/api/Computers` endpoint returned a 404 (no such controller) — user-level deletion via `/api/Users` was the correct approach.

## Configuration Changes

None.

## Credentials & Secrets

- Vault path accessed: `msp-tools/msp360-api.sops.yaml`
  - login: `kY9PvDdWki`
  - password: `p9wzJFRT8nC6VfFz6UDZ`
  - base_url: `https://api.mspbackups.com`

## Infrastructure & Servers

- MSP360 API: `https://api.mspbackups.com`
- B2 Storage account referenced in user destinations: AccountID `ad1b19fd-9350-4fa2-9a07-6200fca14797`, Destination `MSPBackups20200311`

## Commands & Outputs

```bash
# Auth
POST https://api.mspbackups.com/api/Provider/Login
# Body: {"UserName":"kY9PvDdWki","Password":"p9wzJFRT8nC6VfFz6UDZ"}
# Returns: bearer token (14-day expiry)

# List users
GET https://api.mspbackups.com/api/Users
# -> 61 total users, 3 Saguaro entries

# Deletions (all returned HTTP 200)
DELETE https://api.mspbackups.com/api/Users/ff910354-e9e4-4453-84fb-dbca5cf7905d?deleteUserData=true  # DESKTOP-DGM4C1T
DELETE https://api.mspbackups.com/api/Users/114c80eb-897c-4a7e-b3ca-23da6226a856?deleteUserData=true  # DESKTOP-L0U6QUN
DELETE https://api.mspbackups.com/api/Users/a460695c-351c-4036-a487-80f8f7209e14?deleteUserData=true  # SC-SERVER (r.ostrop@saguarousa.com)
```

## Deleted Machines Summary

| Machine | UserID | Storage Freed |
|---|---|---|
| DESKTOP-DGM4C1T | ff910354-e9e4-4453-84fb-dbca5cf7905d | ~1.3 GB |
| DESKTOP-L0U6QUN | 114c80eb-897c-4a7e-b3ca-23da6226a856 | ~221 GB |
| SC-SERVER | a460695c-351c-4036-a487-80f8f7209e14 | ~195 GB |
| **Total** | | **~417 GB** |

Last backup dates: DESKTOP-DGM4C1T and DESKTOP-L0U6QUN — Aug 19, 2025. SC-SERVER — Sep 11, 2025.

## Pending / Incomplete Tasks

None. Task fully completed.

## Reference Information

- Discord thread: 1511507038235263197
- MSP360 API docs: `https://api.mspbackups.com`
- Vault entry: `msp-tools/msp360-api.sops.yaml`
