所有用户可以使用Azure Spring Security进行登录。

huangapple go评论106阅读模式
英文:

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

I used this tutorial 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

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.

huangapple
  • 本文由 发表于 2020年10月7日 18:34:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/64242268.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定