       });
                }
            }


            function openModal(app) {
                document.getElementById('modalTitle').innerText = app.name || 'N/A';
                document.getElementById('modalClientId').innerText = app.client_id || 'N/A';
                document.getElementById('modalAppEnabled').innerText = app.enabled || 'N/A';
                const permissionsDiv = document.getElementById('modalPermissions');
                permissionsDiv.innerHTML = ''; // Clear previous content

