Assigning a workspace to an existing user

I use .NET SS Api to create and mofify users and workspaces.
I am trying to utilize the following method to add a workspace to an existing user:
public async Task can_assign()
await susoClientAdminWS.AssignAsync(new AssignWorkspacesToUserRequest
UserIds = new Guid[] { Guid.Parse(aid) },
Mode = AssignWorkspacesMode.Add,
Workspaces = new[] { awsjm }
susoClientAdminWS … IWorkSpaces
aid … string, the user’s Id
awsjm … string, the name of the workspace

I keep getting error 500.
Where am I wrong?

API Client library has an issue with workspace assignment. It will be fixed soon and released in the next version.

@kankaales , as the C# API client library is a separate project managed on GitHub, you can raise the issues directly for that project, such as

Best, Sergiy