Share via

Microsoft Fabric Data Factory - MS Graph API - Groups/Users - Unable to reference response paging attribute

Laron Lemon 0 Reputation points
2024-10-18T14:59:57.8433333+00:00

I am trying to get all groups and users from MS Graph. These both use paging (limit 100 records per page). To get the next page I need to reference an attribute in the previous repsonse. However, the attribute has '@' and '.' in it... how do I reference this attribute?

 

Attribute: "@odata.nextLink"

 

Activity Expression: 

@activity('Lookup_Group_IDs_copy1').output.value[0].'@odata.nextLink' <-- this does not work

@activity('Lookup_Group_IDs_copy1').output.value[0]['@odata.nextLink']

 ^^ this does not work either...

Cheers,

 

Laron

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 42,941 Reputation points MVP Volunteer Moderator
    2024-10-18T20:43:35.7166667+00:00

    Ensure that the Lookup_Group_IDs_copy1 activity returns a JSON response and that the @odata.nextLink is indeed within the value array as expected. You can inspect the full output by running a debug pipeline and checking the full activity output in the logs.

    If the @odata.nextLink is not inside value[0] but at a different level in the JSON, adjust the path accordingly. For example, if the @odata.nextLink is at the root of the response (outside the value array), you might need something like this:

    
     @activity('Lookup_Group_IDs_copy1').output['@odata.nextLink']
    
    

    If there's a chance that the @odata.nextLink key might be missing or null, you can use the coalesce function to provide a default value in case it is not found. For example:

     @coalesce(activity('Lookup_Group_IDs_copy1').output['@odata.nextLink'], 'default_value')
    

    Try the above steps and see if you can pinpoint the exact location of the @odata.nextLink attribute in your response. Let me know how it goes!

    Was this answer helpful?

    0 comments No comments

Your answer

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