英文:
All users can sign in use azure spring security
问题
我已经准备了一个使用 Microsoft Azure 登录的应用程序。目前的安全设置要求我输入一个包含有登录访问权限的用户组。如何配置活动目录,使得每个邮箱都可以登录该应用程序?
azure:
activedirectory:
tenant-id: mytenantId
user-group:
allowed-groups: Users
我使用了这个教程:https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory#add-a-user-account-to-your-directory-and-add-that-account-to-a-group
如何进行配置,以便任何用户都可以使用 Microsoft 账号登录,而不仅限于添加到用户组中的用户?
英文:
I've prepared an application that uses microsoft azure login. Currently security settings require me to enter a group with users who have access to log in. How to configure active directory so that every email can log in to the application?
azure:
activedirectory:
tenant-id: mytenatId
user-group:
allowed-groups: Users
How to configure it so that any user can log in with microsoft and not just those added in the group?
答案1
得分: 1
尝试从 application.properties
文件中移除 azure.activedirectory.user-group.allowed-groups=Users
,还要从代码中移除与 @PreAuthorize("hasRole('')")
相关的内容。
英文:
Try to remove azure.activedirectory.user-group.allowed-groups=Users
from the application.properties
file, also remove the @PreAuthorize("hasRole('')")
related stuff from your code.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论