-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create user with additional security attributes: Dangling Name #2063
Comments
Thanks for raising this @cascer1 Looks like the serializer may not be able to serialize the CustomSecurityAttributeValue attributeValue = new CustomSecurityAttributeValue();
HashMap<String, Object> additionalData = new HashMap<>();
var additionalUserProperties = new UntypedObject(
new HashMap<>() {
{
put("@odata.type", new UntypedString("#Microsoft.DirectoryServices.CustomSecurityAttributeValue"));
put("organizationIds", new UntypedArray(Arrays.asList(new UntypedString("123"),new UntypedString("321"))));
put("userType", new UntypedString("basic"));
}
});
additionalData.put("UserManagementAPI", additionalUserProperties);
attributeValue.setAdditionalData(additionalData);
newUser.setCustomSecurityAttributes(attributeValue); |
Created microsoft/kiota-java#1388 to investigate/fix |
Hi @andrueastman, thanks a lot for the quick response! Your provided workaround works perfectly, I'm now able to create users and assign custom security attributes like I expected. Since you've already created a new issue in the underlying library to handle this case, I'll close this one :) Cheers |
Describe the bug
I am trying to create a new user in Entra using the Graph API, and include some custom security attributes that I've defined earlier in the Azure portal.
My attribute set is called
UserManagementAPI
with attributesuserType
,userRoles
,lastEnabledDate
, andorganizationIds
. All attributes are of type string, plural names indicate that multiple values are allowed.I suspect that there's a problem somewhere in the backing store for the
CustomSecurityAttributeValue
class.Expected behavior
It should be possible to create users with custom security attributes
How to reproduce
First, create a user without custom security attributes to verify that this works. Then, try adding custom security attributes to the request and observe exceptions.
Code sample:
SDK Version
6.13.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: