使用 Azure java sdk 更新用户和组属性
Update User and Group attributes using Azure java sdk
我正在按照 this 示例创建一个 JAVA class 来管理 Azure AD 用户和组。
它使用以下库:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure</artifactId>
<version>1.2.1</version>
</dependency>
我没有找到 更新 某些 User
和 Group
属性的方法(例如 displayName
或 mailNickname
用户和 displayName
组)。
我知道我可以做这样的事情:
user = client.getAuthenticated().activeDirectoryUsers()
.getByName(uid.getUidValue());
user.update()
.withPassword(accessor.getPassword().toString())
.apply();
但实际上我无法更改其他属性
有什么帮助吗?
谢谢
据我了解,您想通过Azure Graph RBAC Management的Microsoft Azure SDK For Graph RBAC Management com.microsoft.azure.management.graphrbac
. I reviewed the current javadocs更新Azure AD Graph Users & Groups,现在似乎不支持您想要的这些属性更新操作。
所以目前有效的方法是直接使用Azure AD Graph APIs,请参考官方的reference to know how to use it. And there is an offical code sample active-directory-java-graphapi-web。
希望对您有所帮助。
我正在按照 this 示例创建一个 JAVA class 来管理 Azure AD 用户和组。 它使用以下库:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure</artifactId>
<version>1.2.1</version>
</dependency>
我没有找到 更新 某些 User
和 Group
属性的方法(例如 displayName
或 mailNickname
用户和 displayName
组)。
我知道我可以做这样的事情:
user = client.getAuthenticated().activeDirectoryUsers()
.getByName(uid.getUidValue());
user.update()
.withPassword(accessor.getPassword().toString())
.apply();
但实际上我无法更改其他属性
有什么帮助吗?
谢谢
据我了解,您想通过Azure Graph RBAC Management的Microsoft Azure SDK For Graph RBAC Management com.microsoft.azure.management.graphrbac
. I reviewed the current javadocs更新Azure AD Graph Users & Groups,现在似乎不支持您想要的这些属性更新操作。
所以目前有效的方法是直接使用Azure AD Graph APIs,请参考官方的reference to know how to use it. And there is an offical code sample active-directory-java-graphapi-web。
希望对您有所帮助。