diff --git a/changelog/unreleased/enhancement-replace-deprecated-substr b/changelog/unreleased/enhancement-replace-deprecated-substr
new file mode 100644
index 000000000..4fdbddf5c
--- /dev/null
+++ b/changelog/unreleased/enhancement-replace-deprecated-substr
@@ -0,0 +1,7 @@
+Enhancement: Replace deprecated String.prototype.substr()
+
+We've replaced all occurrences of the deprecated String.prototype.substr()
+function with String.prototype.slice() which works similarly but isn't
+deprecated.
+
+https://github.com/owncloud/ocis/pull/3448
diff --git a/idp/ui/src/containers/Login/Chooseaccount.js b/idp/ui/src/containers/Login/Chooseaccount.js
index 5eba58f4f..fd40b7ab6 100644
--- a/idp/ui/src/containers/Login/Chooseaccount.js
+++ b/idp/ui/src/containers/Login/Chooseaccount.js
@@ -85,7 +85,7 @@ function Chooseaccount({ loading, errors, classes, hello, history, dispatch }) {
className={classes.accountListItem}
disabled={!!loading}
onClick={(event) => logon(event)}
- >{username.substr(0, 1)}
+ >{username.slice(0, 1)}