Describe the bug
The second parameter EndDateTime of the AddTokenSigningCertificate which is the type DateTimeOffset returns the following error: The 'endDateTime' parameter is not in correct format. It is expected to be UTC DateTime.
It seems that there is a conversion issue when calling the graph inside the SDK.
Describe the bug The second parameter EndDateTime of the AddTokenSigningCertificate which is the type DateTimeOffset returns the following error: The 'endDateTime' parameter is not in correct format. It is expected to be UTC DateTime.
It seems that there is a conversion issue when calling the graph inside the SDK.
https://docs.microsoft.com/en-us/graph/api/serviceprincipal-addtokensigningcertificate?view=graph-rest-1.0&tabs=csharp
To Reproduce Steps to reproduce the behavior:
Try the example provided in the docs. This will produce the error.
var displayName = "CN=customDisplayName";
var endDateTime = DateTimeOffset.Parse("2024-01-25T00:00:00Z");
await graphClient.ServicePrincipals["{servicePrincipal-id}"] .AddTokenSigningCertificate(displayName,endDateTime) .Request() .PostAsync();
Expected behavior
HTTP/1.1 200 OK, with the response object.
Additional context Microsoft.Graph version 4.35.0