diff --git a/user_saml/ajax/regenerate_password.php b/user_saml/ajax/regenerate_password.php
new file mode 100644
index 0000000000..f270df5687
--- /dev/null
+++ b/user_saml/ajax/regenerate_password.php
@@ -0,0 +1,22 @@
+ $password));
+} else {
+ \OC_JSON::error();
+}
+
+
diff --git a/user_saml/js/personalsettings.js b/user_saml/js/personalsettings.js
new file mode 100644
index 0000000000..08afcecbab
--- /dev/null
+++ b/user_saml/js/personalsettings.js
@@ -0,0 +1,17 @@
+$(document).ready(function() {
+ $('#regenerate_password_button').on( "click", function(){
+ OC.dialogs.confirm(
+ t('user_saml', 'Are you sure to reset your desktop client password?'),
+ t('user_saml', 'Reset desktop client password?'),
+ function(reset) {
+ if(reset) {
+ $.post(OC.filePath('user_saml', 'ajax', 'regenerate_password.php'), "regenerate_password", function(data){
+ $("#newpassword").text(data.data);
+ });
+ }
+ },
+ true
+ );
+
+ });
+});
diff --git a/user_saml/personalsettings.php b/user_saml/personalsettings.php
new file mode 100644
index 0000000000..914d7a7dcf
--- /dev/null
+++ b/user_saml/personalsettings.php
@@ -0,0 +1,45 @@
+
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see