diff --git a/api/src/main/java/io/github/wulkanowy/api/login/Login.java b/api/src/main/java/io/github/wulkanowy/api/login/Login.java index b8b524384..3ecfb7b6c 100644 --- a/api/src/main/java/io/github/wulkanowy/api/login/Login.java +++ b/api/src/main/java/io/github/wulkanowy/api/login/Login.java @@ -130,6 +130,10 @@ public class Login { .parse(certificate.replaceAll(":", ""), "", Parser.xmlParser()) .select("[AttributeName=\"UserInstance\"] samlAttributeValue"); + if (instances.isEmpty()) { // on adfs login + return ""; + } + if (instances.size() < 2) { // 1st index is always `Default` throw new AccountPermissionException("First login detected, specify symbol"); }