You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
I don't seem to be able to roll users out with the Box V2 .Net SDK SDK. If I take the same exact key and use it with the Python SDK, it seems to work fine. The Box V2 .Net SDK indicates it successfully updated the user but nothing changes. Even the Box Admin report indicate the user changed, but they are still in the enterprise. I went through and modified my request to have it change the user's name and that worked fine, but it didn't roll the user out still.
Steps to Reproduce
The code that is making the change is currently:
var updates = new BoxUserRequest()
{
Id = boxId,
Name = "Test Box Rollout",
Enterprise = null
};
try
{
//Rolling the user out
BoxUser updatedUser = adminClient.UsersManager.UpdateUserInformationAsync(updates).GetAwaiter().GetResult();
}
catch (Exception Ex)
{
Logger.LogError(methodName + ": Error rolling user out of enterprise " + Email + " Exception: " + Ex.Message.ToString());
}
Expected Behavior
It updated the user's name in Box, but did not roll them out. If we remove the Name from the BoxUserRequest, it will do nothing to the user's account at all.
Versions Used
.Net SDK: Box.V2 version 3.25.0. The application is targeting .Net Framework 4.6.1
Windows: Windows Server 2016 Version 1607
The text was updated successfully, but these errors were encountered:
I've submitted a pull request to fix this issue: #709 . The problem occurs because the Serialize function under Box.V2.Converter.BoxJsonConverter is set to ignore null values. Thus we pass a null in and it ignores it and never puts it on the request. To get around this, I've created a separate UserRequestEntity class and am looking for that class in the BoxJsonConverter. If I see it, I don't pass the option to ignore nulls in the conversion to a JSON string.
My solution is probably not the most elegant as I'm not a great programmer nor am I well versed in C#. Hope this helps. Thanks!
Description of the Issue
I don't seem to be able to roll users out with the Box V2 .Net SDK SDK. If I take the same exact key and use it with the Python SDK, it seems to work fine. The Box V2 .Net SDK indicates it successfully updated the user but nothing changes. Even the Box Admin report indicate the user changed, but they are still in the enterprise. I went through and modified my request to have it change the user's name and that worked fine, but it didn't roll the user out still.
Steps to Reproduce
The code that is making the change is currently:
Expected Behavior
It updated the user's name in Box, but did not roll them out. If we remove the Name from the BoxUserRequest, it will do nothing to the user's account at all.
Versions Used
.Net SDK: Box.V2 version 3.25.0. The application is targeting .Net Framework 4.6.1
Windows: Windows Server 2016 Version 1607
The text was updated successfully, but these errors were encountered: