ConditionNotMet for UpdateRelationships action

Oleksandr Budnyk 0 Reputation points
2024-02-19T10:29:45.1+00:00

Hello,
I am using UpdateRelationships action to update supersedence list for intune application. It works well, but, sometimes, during removing relationships (same action but with empty array body) I got an ConditionNotMet result.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,019 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,070 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Crystal-MSFT 48,596 Reputation points Microsoft Vendor
    2024-02-20T01:33:34.2166667+00:00

    @Oleksandr Budnyk, Thanks for posting in Q&A. Based as I know, the ConditionNotMet error in the UpdateRelationships action occurs when the specified condition is not met for the requested operation. This error can occur when trying to remove a relationship that does not exist. You can check if the relationship exists before attempting to remove it to avoid this error. And if there's any information wrong.

    https://learn.microsoft.com/en-us/graph/api/intune-apps-mobileapprelationship-list?view=graph-rest-beta

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Oleksandr Budnyk 0 Reputation points
    2024-02-26T12:36:42.6433333+00:00

    Hello,
    I added a condition (if application contains at least 1 relationship where it has TargetType = Parent) check before action that updates superseded relationships.

    Now this works for applications that have no relationships, but I still get this exception on this action even when trying to update list with empty array for application where I know there is at least 1 superseded application.

    Additional note from my observations, this response I got for applications that have group assignments and updateRelationships action is performed not at once when app created in Intune but with some delay 40~80 min.


  3. Oleksandr Budnyk 0 Reputation points
    2024-04-02T10:43:16.21+00:00

    Hi,
    Wrapping api calls in retry structure helps and error in not occurring for now.
    Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.