Dev #9
@@ -59,7 +59,13 @@ if (!$stateUserId && (empty($receivedState) || empty($expectedState) || !hash_eq
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Autorisatiecode controleren
|
// Afhandeling van beheerderstoestemming (Admin Consent)
|
||||||
|
if (!empty($_GET['admin_consent'])) {
|
||||||
|
header('Location: /integrations.php?success=' . urlencode('Beheerdersgoedkeuring voor uw organisatie is succesvol verleend! Klik nu op "Koppel Outlook" om uw agenda te synchroniseren.'));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. Autorisatiecode controleren
|
||||||
$code = $_GET['code'] ?? '';
|
$code = $_GET['code'] ?? '';
|
||||||
if (empty($code)) {
|
if (empty($code)) {
|
||||||
header('Location: /integrations.php?error=' . urlencode('Geen autorisatiecode ontvangen van Microsoft.'));
|
header('Location: /integrations.php?error=' . urlencode('Geen autorisatiecode ontvangen van Microsoft.'));
|
||||||
|
|||||||
+20
-3
@@ -382,10 +382,27 @@ $redirectUri = rtrim(APP_URL, '/') . '/auth/callback_microsoft.php';
|
|||||||
<p class="font-semibold text-slate-300 flex items-center space-x-1">
|
<p class="font-semibold text-slate-300 flex items-center space-x-1">
|
||||||
<span>💡 Wat moet hier staan?</span>
|
<span>💡 Wat moet hier staan?</span>
|
||||||
</p>
|
</p>
|
||||||
<p>• Laat simpelweg <code>common</code> staan (werkt voor elk Microsoft account).</p>
|
<p>• Voor uw organisatie: vul uw domein in (bijv. <code>planningsagenda.nl</code>) of uw Tenant GUID.</p>
|
||||||
<p>• Of vul <code>organizations</code> in voor elk zakelijk Microsoft 365 werkaccount.</p>
|
<p>• Voor multi-tenant apps: vul <code>organizations</code> of <code>common</code> in.</p>
|
||||||
<p>• U hoeft alleen uw specifieke Tenant GUID in te vullen als uw Azure app is ingesteld op <em>Single tenant (Alleen mijn eigen organisatie)</em>.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$curClientId = !empty($outlookSettings['client_id']) ? $outlookSettings['client_id'] : fociz_env('MICROSOFT_CLIENT_ID', '');
|
||||||
|
$curTenantId = !empty($outlookSettings['tenant_id']) ? $outlookSettings['tenant_id'] : 'organizations';
|
||||||
|
if (!empty($curClientId)):
|
||||||
|
$adminConsentUrl = "https://login.microsoftonline.com/" . urlencode($curTenantId) . "/adminconsent?client_id=" . urlencode($curClientId) . "&redirect_uri=" . urlencode($redirectUri);
|
||||||
|
?>
|
||||||
|
<div class="mt-2 p-2.5 rounded-lg bg-amber-500/10 border border-amber-500/30 text-[11px] flex items-start space-x-2">
|
||||||
|
<i data-lucide="shield-alert" class="w-4 h-4 flex-shrink-0 mt-0.5 text-amber-400"></i>
|
||||||
|
<div class="text-slate-300 leading-snug">
|
||||||
|
<strong class="text-amber-300 block">Krijgt u "Beheerdersgoedkeuring vereist"?</strong>
|
||||||
|
<span>In Azure staat de goedkeuring standaard op 'Niet verleend'. Open deze directe link als beheerder om het met 1 klik goed te keuren:</span><br>
|
||||||
|
<a href="<?= htmlspecialchars($adminConsentUrl) ?>" target="_blank" class="inline-flex items-center space-x-1 font-bold text-amber-400 hover:text-white underline mt-1">
|
||||||
|
<span>Beheerdersgoedkeuring direct verlenen via Microsoft →</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="flex items-center space-x-2 text-xs text-slate-300 pt-1">
|
<label class="flex items-center space-x-2 text-xs text-slate-300 pt-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user