web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get WorkItem Details V...
Power Automate
Answered

Get WorkItem Details V2 Failing with As-of Date Parameter

(1) ShareShare
ReportReport
Posted on by Microsoft Employee
While attempting to use the Get WorkItem Details V2 action in power automate, any value I supply for the As-of Date Parameter results in the following error:

Azure DevOps ActivityId: 2b5d8129-e67a-455b-9cf5-8395c5f25273
Details: {"count":1,"value":{"Message":"The value '2026-06-09T20:49:34.0000000 00:00' is not valid for Nullable`1.\r\n"}}

I am able to successfully get results using an API call with the same value:
dev.azure.com/ORGANIZATION/_apis/wit/workitems?ids=XXXX&expand=all&asOf=2026-06-09T20:49:34.617Z&api-version=7.2-preview.3

What magic or formatting must I do to fix this in the Power Automate action?
Categories:
I have the same question (0)
  • Valantis Profile Picture
    6,735 on at
     
    The error is the key: "The value '2026-06-09T20:49:34.0000000 00:00' is not valid for Nullable`1"  notice the space before the timezone offset (00:00). The connector is serializing the datetime with a space instead of a + or - sign in the UTC offset, which the API rejects.

    The fix:
    pass the date in ISO 8601 format with a Z suffix instead of the offset, using a formatDateTime expression:
    formatDateTime(utcNow(), 'yyyy-MM-ddTHH:mm:ssZ')
    or for a specific date:
    formatDateTime('2026-06-09T20:49:34Z', 'yyyy-MM-ddTHH:mm:ssZ')
     
    The Z suffix (UTC indicator) avoids the timezone offset serialization issue entirely. Your direct API call works because you're using 2026-06-09T20:49:34.617Z which has Z, while the connector is transforming it to the offset format with a space.

    If formatDateTime with Z still doesn't work because the connector parses it back to the offset format internally, try passing it as a plain string using the expression tab rather than the dynamic content picker:
    '2026-06-09T20:49:34Z'

    This bypasses the connector's datetime type handling entirely.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

  • Suggested answer
    chiaraalina Profile Picture
    2,425 Super User 2026 Season 1 on at
     
    It did nor work for me either. What worked for me:
     
    _apis/wit/workitems?ids=[id]&$expand=all&asOf=2026-06-09T20:49:34.000Z&api-version=7.2-preview.3
     
     
    Let me know if it worked!
  • JG-21051424-0 Profile Picture
    Microsoft Employee on at
     @Valantis It would seem neither of those options was able to prevent the connector from reformatting the date string (incorrectly). Even looking at the action in 'Code View' shows:
    "asOf": "2026-06-09T20:49:34Z"
    The action still fails with the same error showing a space prior to an offset
    "Message\":\"The value '2026-06-09T20:49:34.0000000 00:00' is not valid for Nullable`1.\\r\\n\"
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     
    i believe the only workaround is to bypass the connector and call the API directly using an HTTP action:
    1. Add an HTTP action
    2. Method: GET
    3. URI: https://dev.azure.com/{organization}/_apis/wit/workitems?ids={id}&expand=all&asOf=2026-06-09T20:49:34.000Z&api-version=7.2-preview.3
    4. Authentication: Active Directory OAuth
       - Authority: https://login.microsoftonline.com
       - Tenant: your tenant ID
       - Audience: 499b84ac-1321-427f-aa17-267ca6975798 (Azure DevOps)
       - Client ID + Secret: your Entra app registration
     
    This should give you full control over the date format in the URL and bypasses the connector's datetime serialization completely.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard