expose external_id on Auth0.ManagementApi.Models.Job
gwrobbiekouwenberg opened this issue · 7 comments
Checklist
- I have looked into the Readme and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
The current Job entity does not expose external_id while you can retrieve it via direct Rest call to the API.
Describe the ideal solution
Add external_id to the Job entity
Alternatives and current workarounds
I can currently use a direct Rest call using HttpClient but this seems like a workaround when this SDK exists.
Additional context
No response
Thanks for reaching out.
I can't see any external_id being mentioned on the documentation for the corresponding API endpoint, assuming you are talking about the endpoint to retrieve a job.
Can you elaborate the endpoint you are talking about and refer to the correspondig documentation so I can see what you mean?
Thanks for the quick response.
I am using the Auth0.ManagementApi
v7.22.3 NuGet package to call the Auth0.ManagementApi.Clients.IJobsClient
GetAsync
method to retrieve the status of a job. (through a IManagementApiClient)
see:
Docs I used:
- api: https://auth0.github.io/auth0.net/api/Auth0.ManagementApi.Clients.IJobsClient.html#Auth0_ManagementApi_Clients_IJobsClient_GetAsync_System_String_System_Threading_CancellationToken_
- Job model: https://auth0.github.io/auth0.net/api/Auth0.ManagementApi.Models.Job.html
I can use the following rest api to get the same data:
https://auth0.com/docs/api/management/v2/jobs/get-jobs-by-id
The documentation does not seem to reflect the actual data being returned by the api.
given a valid job id i can get the following response.
{
"type": "users_import",
"status": "completed",
"connection_id": "con_redacted",
"external_id": "96acfb71-a182-4d7f-8010-75cf6364385b",
"summary": {
"failed": 0,
"updated": 1000,
"inserted": 0,
"total": 1000
},
"connection": "Username-Password-Authentication",
"created_at": "2023-09-06T12:23:28.899Z",
"id": "job_CLn76OPRAah1GXwA"
}
Thanks for that. The thing is that it's hard for us to support fields that aren't documented as that could mean they are not (or no longer) supported. Our source of truth is the API docs I linked, and they do not mention any external_id
at all.
Can you elaborate on what external_id
is in this case and where it comes from?
@frederikprijck I see that you added the external_id field as a int, but the documentation mentions it is a "Optional user-defined string", see https://auth0.com/docs/manage-users/user-migration/bulk-user-imports#request-bulk-user-import.
Sadly this now breaks our integration, as we are sending guids to Auth0 as external id. (this broke when we upgraded from 7.22 to 7.24). Do I need to create a new issue for this?
@benrorije fixed in #679
That is quick, thanks! :-)