How to implement paging on Azure Data Factory External Call using Graph API - pagination

I'm using Azure Data Factory to collect information from SharePoint. To do this I'm using the Graph API and 2x actions - First one is Copy Data. This action works fine and i'm able to get the information I need and have pagination implemented. The "#odata.nextLink" property is passed back in the response body and is then used in the pagination section to get the next page of data - this works fine and gets all available pages.
The issue I'm having is in my next action - Data Flow. This action gets a list of document libraries then calls the graph endpoint to get the files in each of these libraries - it does this successfully for all libraries but only for the first page. I've tried to configure paging but the "External Call" action's pagination section is different and seems to want a column?:
I've tried several settings but the value (URL) i'm looking to call is provided in the response body from the endpoint and I cant see a way to access it or feed that back into the External Call to fetch the next page like what is done with the Copy Data function (Screenshot 1). It only seems to be able to access columns that were input from the previous action. All examples/documentation I've found all use the Copy Data activity (1st screenshot) including here:
https://learn.microsoft.com/en-us/azure/data-factory/connector-rest?tabs=data-factory#pagination-support
Thanks.

Related

passing data to and from Vue/React app in Netsuite Suitelet

Ok so basically what I need is as follows. I have managed to display a VueJS App using a Suitelet.
What I'm unsure of is how I should be passing data back and forth. In the end what I need to build is some sort of table with filters to display data dynamically... I can't figure out what the best way to send the query's from the VueApp and then get the data back from netsuite would be.
I considered using a second Suitelet as a API, making it external and then using that as a way to receive query's and send back data... I understand that this method is unsecure and not recommended so what are my other options and how would they be implemented?
TIA

How do i fetch only internal messages from O365 using Graph API

I wan't to fetch only messages that are only internal to organization.
Right now the way i see is fetch domains first then for each message see if from/sender domain belongs to that message , based on that differentiate.
But this is lengthy process and not a foolproof technique.
Is there any GRAPH API query i can use which readily provides this ?
It does not apear that the REST API queries for Office 365 includes this information directly in the messages. From the Version 2.0 And the Beta this is not included in message output.
However, it looks like you might be able to get it from the REST API via the headers.
Try the following query:
https://graph.microsoft.com/beta/me/messages?$select=internetMessageHeaders&$top=1
This takes top one messages and shows you the email header of the message.
In the header look for X-OriginatorOrg. The value should be the main domain of your organisation.
Alternatively you can look at the X-MS-Exchange-Organization-MessageDirectionalityheader. If the value here is Originating it should come from inside your own organisation.

Get delta users (Users creatad between date) - office 365 graph API

I am making a timer job in c# which will make a call to office 365 and fetch newly created users. For example, if I run it now it should fetch users since last run till current time (Delta). However I dont see any FILTER or API parameter where I can pass date and get ONLY those users who are updated or created after specific date.
Is there any API available something like this;
https://graph.windows.net/{MYORG}/users?api-version=1.6&[Filter=createdDate
gt 12/12/2016 or modifiedDate gt 12/12/2016]
Azure AD Graph API can't do this as far as I am aware of, the User entity does not contain creation or modification dates to query on.
However, the beta endpoint of the Microsoft Graph API should be able to do this. You can follow the instructions here: https://graph.microsoft.io/en-us/docs/concepts/delta_query_users. Simply put you must:
Call the users endpoint with the delta function
If you got a skip token, it means there are more pages
Fetch the next page until you no longer get a skip token but get a delta token instead
This delta token allows you to call the endpoint anytime later to get only the modified users (created/updated/deleted)
General guidance for delta queries
I found that blog already however its under delta and throwing errors to me. Here is what I got in response of first call;
https://graph.microsoft.com/beta/users/delta?$skiptoken=
when I did a GET to that link, I am getting error saying the resource you are trying to request is either does not exist or has been removed or...
I feel there is a bug as its beta API.
However, good news is I just found another blog which seems to have be fixed my problem using following query;
https://graph.windows.net/XYZ.onmicrosoft.com/directoryObjects?api-version=1.6&deltaLink=
I will anyway mark your answer as accepted assuming Microsoft will fix the issue I am getting from backend.

Retrieving files from blog media entries

The tool I'm building needs pull data from IBM Connections Ideation Blogs. I therefore use the Connections API with basic authentication to read Blog Entries. This goes well until the description contains images. When I ask the API to provide media resources for the blog, it does not show any entries of the /BLOGS_UPLOADED_IMAGES location - the one containing images uploaded through the blog's richtext editor. The user I use in my API call is the same user who created blog entries and uploaded pictures.
However the API call DOES contain images I publish using the API and a POST request to the blog's media entry collection. This is where the next problem appears. Those Atom entries for images contain various links, one of them with a ref="enclosure", of which the API documentation (link) tells me to "Use the web address in the href attribute to obtain the binary content of the file". However, my calls to this adress are always answered with 404 response code.
Another url in the Atom entry (this time of the element) is described by the same documentation (see link above) as: "Provides access the document's media. The following operation is supported: GET: Use the web address to obtain the media." When I make a call to this url, as always with basic authentication credentials attached, the response contains the html of the login form of Connections, so API authentication does not seem to be supported on this url. This is only the case for non-public communities, which require authentication, of course, if the picture is publicly availabe all works just fine.
Am I missing something out? Is there another way to retrieve the actual image from a blog's media entry through the API? Are manually uploaded pictures never contained in the media entries result or is this a bug?
It now magically works using the link with ref="enclosure" from the atom entry. I might have gotten something wrong with authentication I guess (although I'm not actually realizing what I'm doing different now than I did before).
Problem remaining: Pictures uploaded through the rich-text editor in the folder /BLOGS_UPLOADED_IMAGES do not appear in the media feed of the blog.

Passing data to html web resource via code, crm 2011

I've put an html web resource on my contract form and would like to pass via the data= parameter some information that comes from a plugin that is registered for PostRetrieve. I know how to set static info for the web resource, but I can't find in the SDK how to set it dynamically from a plugin. Is this possible?
Background info
I'm new to developing for CRM so it's quite possible that I'm not taking the most effective route in building this project. Let me give you some more detail: when a contract is opened in CRM, my plugin retrieves some business information from a different sql server and fills in a few of the contract fields. This is working fine. However, I would also like to display a table of usernames and links that come from the remote sql server on the crm contract form. Because I did not want to save this info in the contract entity and because there are links I want the user to click on, I thought a web resource displayed on the form was the best implementation.
My thought was to pass all the data to the web resource via the data= parameter and then parse and build a table using javascript in the web resource.
What seemed to work best:
The plugin retrieves the info from the remote sql server, serializes the generic list to json and puts it in a hidden text field on the form.
The html web resource gets the content of the hidden field, does an eval, and builds a table.

Resources