true, 'message' => 'Settings updated successfully']); } else { echo json_encode(['success' => false, 'message' => 'Invalid request method']); } exit; } // Check for saved credentials in cookies $savedTenantId = $_COOKIE['tenantId'] ?? ''; $savedClientId = $_COOKIE['clientId'] ?? ''; // Ask for Microsoft credentials if not stored if (empty($savedTenantId) || empty($savedClientId) || !isset($_SESSION['clientSecret'])) { if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['tenantId'])) { $tenantId = trim($_POST['tenantId']); $clientId = trim($_POST['clientId']); $clientSecret = trim($_POST['clientSecret']); // Save tenant ID and client ID in cookies (30 days) setcookie('tenantId', $tenantId, time() + (30 * 24 * 60 * 60), '/', '', true, true); setcookie('clientId', $clientId, time() + (30 * 24 * 60 * 60), '/', '', true, true); // Keep only client secret in session $_SESSION['clientSecret'] = $clientSecret; $_SESSION['showLogs'] = isset($_POST['showLogs']) ? true : false; header('Location: ' . $_SERVER['PHP_SELF']); exit; } echo '
Policy.ReadWrite.AuthenticationMethodUserAuthenticationMethod.ReadWrite.AllUser.Read.AllDirectory.Read.All
TOTP Tokens Inventory| Serial | Device | Hash | Time | User | Status | Seen | Actions |
|---|---|---|---|---|---|---|---|
| = htmlspecialchars($t['serialNumber']) ?> | = htmlspecialchars($t['manufacturer'] . '/' . $t['model']) ?> | = htmlspecialchars($t['hashFunction']) ?> | = htmlspecialchars($t['timeIntervalInSeconds']) ?>s | = isset($t['assignedTo']['displayName']) ? htmlspecialchars($t['assignedTo']['displayName']) : 'Unassigned' ?> | = htmlspecialchars($t['status']) ?> | = htmlspecialchars($t['lastUsedDateTime'] ?? 'Never') ?> |