Trouble working with the JobsClient C# SDK

I’ve implemented the Management and Authentication SDKs and they work well. I noticed that there was a ImportUsersAsync method as part of the management API, but that doesn’t work with an error regarding content type or something like that. So I found there was a Jobs client with the same method but I can’t get it to work.

This is the code that returns the client:

var headers = new Dictionary<string, string> {
                { "authorization", $"Bearer {GetToken()}" },
                { "content-type", "multipart/form-data; boundary=---011000010111000001101001" }
            };

            return new JobsClient(_managementConnection, new Uri($"https://{_settingsManager.AuthProviderDomain()}/api/v2/"), headers);

If I remove the content-type header I get the error “Must provide ‘connection_id’ as multipart part”. So that stays.

Because I wasn’t sure about posting a json file, as opposed to simply json I write a json file to disk, then read it and pass the FileStream into the method call.

JobsClient.ImportUsersAsync(_connectionId, "users.json", fsSource, true). fsSouce being the FileStream.

When I make the request nothing returns. I’m managing the sync method the same way I do with the other implementations but nothing.

Any help on this?

Hey there I believe we would be able to handle that quickly with a little bit of help from the repo maintainers. Can you look at this FAQ and follow that? Thank you!

https://community.auth0.com/t/i-follow-your-docs-quickstart-and-i-have-a-problem-but-it-has-a-github-repo-what-do-i-do-now/39519/3