strange behavior office 365 contact API - exchange-server

I'm trying to consume the Office 365 contacts api, and I got a strange response every time that I change some of the parameters...
For example, accessing the following url https://outlook.office365.com/api/v1.0/me/contacts?$top=10
I get 10 contacts, and an url to the next page https://outlook.office365.com/api/v1.0/me/contacts/?$top=10&$skip=10
Accessing the url above, I get 8 contacts and no next page url.
However, if I try to access the next page explicitly (https://outlook.office365.com/api/v1.0/me/contacts/?$top=10&$skip=20 I get 10 contacts and a next page url)
what am I doing wrong? is that a bug?

I'd like to see if I get the same results. How many total contacts do you have in your default Contacts folder? I'm trying to figure out which behavior is wrong.
UPDATE: I tried this here and could not reproduce your results. I wonder if one of the contacts in your folder is somehow causing a processing problem. It might help to narrow down the problem if you can move the contacts that come back in your second query (?$top=10&$skip=10) to another folder and repeat your test. Do you still get the weird result?

Related

Google people.searchDirectoryPeople doesn't return peoples photos

I'm trying to use people.searchDirectoryPeople API to get photos from people in my organization. According to the documentation, I should have the https://www.googleapis.com/auth/directory.readonly access token, which I have provided. But results are missing the photos array ( according to the documentation there should be a photos array for each one of the results). I've set the mask to photos. If I set it to emailAddresses,photos It will return the emailAddresses array but not the photos. I can't find what I'm missing here, is there any specific scope that I should add or some other parameter.
P.S: I've added the https://www.googleapis.com/auth/userinfo.profile scope too, but no luck. Any idea where I should continue looking/investigating?
Thanks!
I've managed to find the root of the problem.
When I added a new user to my account, I added their images from the Google Amin page, but that seems to be the issue. Those photos are not shown when using the People API. When I logged in to the newly created account and changed the profile photo from there, it started showing in the results from API. Maybe it's but if you go back to Google Admin and change it again, it will stop showing again.
Looks like it's a bug in the Google Admin page or it is intended behavior but not mentioned in the documentation.
I've reported an issue: https://issuetracker.google.com/issues/228791251

is using IMPORTXML function in Excel detected by the sites I'm getting the data from?

I have recently started learning doing some spreadsheets with this function (IMPORTXML). I'm getting updated prices on specific items from a public website.
My question is, is there any way for the site owners to detect that I'm somehow getting the prices into my google spreadsheet and if so, how can I know how much "load" I'm causing by getting the data off the site? Should I be more careful not to get my IP banned by the site owners?
I'm kinda new to all of this but I haven't been able to find much information on how exactly IMPORTXML function works.
I thought it's just loading a website a few times per day and getting the source code values into my spreadsheet, so I thought the website owner wouldn't even know I'm getting any data from them.
Would somebody be so kind and try to explain me in newbie terms how this works and if I should be more careful with using the IMPORTXML function?
Many thanks :-)

How to scrape LinkedIn for connections with Google Sheets [duplicate]

This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed last month.
Trying to scrape my LinkedIn account for the first 20 connections using Google Sheets.
I'm guessing that it's not working because I'm asking for "mynetwork" but that doesn't give Google Sheets an id? Not sure, I'm brand new to Google Sheets.
Any help GREATLY appreciated!
I've tried the following:
=ImportFeed( "https://www.linkedin.com/mynetwork/invite-connect/connections/")
ERROR Imported Content is Empty
=IMPORTXML( "https://www.linkedin.com/mynetwork/invite-connect/connections/", "//div[#class="ember-view")")
ERROR Formula Parse Error
=IMPORTHTML("https://www.linkedin.com/mynetwork/invite-connect/connections/", "list", "1")
ERROR Could not fetch url: https://www.linkedin.com/mynetwork/invite-connect/connections/
The problem appears to be intermittent. The web query works whenever moved to a new sheet, or whenever the URL is broken and then corrected, forcing a refresh. The data is there one minute, and vanishes the next, but has always been restored as described.
The sheet is public at this URL, and te web query is present in the cell AK12 at this writing. copy the sheet and then Break the URL and restore it to demonstrate the workaround.
Google Sheets does not support scraping of JavaScript elements nor any elements behind the login. the best course of action would be to look at LinkedIn API: https://developer.linkedin.com/docs/rest-api

Is it possible to add "Other calendar by URL" in google calendar API?

I have been unable to find help on Google Calendar APIreference. I am looking for a resource which makes the same things like option in user interface "Add by URL"( see below).
Is it possible to add other calendars by URL through Google Calendar API?
I dont think this is supported yet. You can read below the "Add by URL" that this is for iCals.
With respect to DalmTo's suggestion, I tried placing an iCal URL as "id" in the POST request in
CalendarList.insert. It didn't work.
I got an error saying:
"code": 404,
"message": "Not Found"
But, when I added it manually using the Add by URL field, it was inserted.
This only means that CalendarList.insert doesn't accept iCal URLs. I also checked the CalendarList resource and no mention of iCal URLs were present.
Add by URL is not very good functionality.
We tried that and there are 2 main reasons why not to use it:
1. Users won't use it. They just don't understand it as it is too complicated. I understand you are looking solution for that - fine and good luck;
2. Google doesn't like it. For MANY years already Google is keeping artiicial time-lag between your ical source and Google Calendar. Approximately 6 hours. Meaning - if you update event in your application the update will be visible in Google Calendar after around 2-6 hours.
Maybe, just maybe, if you find Server-toServer solution for this, it is fixed but adding ical link is a waste.

Will a single GSA search request that specifies two site collections get loaded into the suggestions database for both sites?

Will a single GSA search request that specifies two site collections get loaded into the suggestions database for both sites?
For example consider the following query,
http://gsa/search?q=hello&site=site1|site2&client=myfrontend
If results are returned from both collections will the query "hello" get loaded into the suggestion database for both,
1. client=myfrontend&site=site1
2. client=myfrontend&site=site2
So far I have not seen the query get loaded into either suggest database, but perhaps I have not waited long enough, which makes me wonder is there any way to quickly reset/reload suggestions? In the past I have tried resetting them via admin console's suggestions page, and then enabling/disabling suggestions via the frontend, but it does not always regenerate them. Is there any other procedure people follow to reload suggestions?
Contacted Google support and, if multiple collections are defined in search request the suggestion gets logged to the default_collection.
They are working on a resolution :)

Resources