Connection between Users and People in Microsoft Graph API - microsoft-graph-api

Using the Microsoft Graph API I'm fetching a list of users using the following endpoint:
https://graph.microsoft.com/v1.0/users
After that, I want to check if a user is an actual person. For that, I'm planning to use People endpoint.
However, I can't find a method that will return all people in the organization. Users can also represent a room or a group and I want to be able to differentiate them. The only options that I could see are:
https://graph.microsoft.com/v1.0/me/people
https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/people
But they only return people that are related to a user with the provided id.
Is there a solution for getting a corresponding Person object for every User in the organization?

The /people endpoint can only return a person object if there is a connection between the person and the user.
Consider what a person represents:
An aggregation of information about a person from across mail, contacts, and social networks. People can be local contacts, contacts from social networking or your organization's directory, and people from recent communications (such as email and Skype).
If the user and the person are not connected in some way, there aren't enough sources to aggregate for a response. More importantly, the sources for someone#someplace.com will be different between two user records (i.e. I'm connected with them on Skype and LinkedIn, you've only emailed them once a while back).
Also note that to pull a single person, you need to provide that person's id:
`/me/people/{id}`

Related

How we can publish a twitter dataset?

We are going to collect records of roughly 80M from twitter but, we do not know if that is legal or illegal to publish it somewhere like Github.
I saw that users, mostly publish the tweet IDs other than the whole tweet data (like text, username and ...). How is possible to publish twitter data?
I saw that users, mostly publish the tweet IDs other than the whole tweet data
That's correct, and that's aligned with the Twitter Developer Policy that you agree to when using the API, which states:
If you provide Twitter Content to third parties, including downloadable datasets or via an API, you may only distribute Tweet IDs, Direct Message IDs, and/or User IDs (except as described below). We also grant special permissions to academic researchers sharing Tweet IDs and User IDs for non-commercial research purposes.
[... - ...]
Academic researchers are permitted to distribute an unlimited number of Tweet IDs and/or User IDs if they are doing so on behalf of an academic institution and for the sole purpose of non-commercial research. For example, you are permitted to share an unlimited number of Tweet IDs for the purpose of enabling peer review or validation of your research. If you have questions about whether your use case qualifies under this category please submit a request via the API Policy Support form.
Basically, if you are in any doubt you should ask Twitter directly via the form linked above, but the policy is pretty clear that you should only be sharing Tweet IDs. You should also have stated your intent when applying for API access.

Is there a graph api that sends message from channel/team to individual person?

I am looking for a solution where a team can contact a single user via chat.
Adding that user to the team and then removing could be a possible solution - but not that good. Also, if team A wants to connect person B and person C separately.
Microsoft Teams allows users to bring bots into their channel or group chat conversations. By adding a bot to a team or chat, all users of the conversation can take advantage of the bot functionality right in the conversation. You can also access Teams-specific functionality within your bot like querying team information and #mentioning users.
Chat in channels and group chats differ from personal chat in that the user needs to #mention the bot.
Please refer below doc:https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bot-conversations/bots-conv-channel

Find all the contacts I sent an email to via Outlook Rest API

I'm trying to get all the contacts I sent a email (or responded to) via Outlook Contacts Rest API.
The default Outlook contact API only gives me contacts that I created in my contact manager. But I found "Is there a way to get the Suggested Contacts through Outlook API?" and sure enough, it gives me all "suggested" contacts (i.e. any contact I ever received an email from or sent an email to).
is this really the way to do it? No way in the "classic" API?
any way to find all the contacts I talked to (i.e. I wrote an email to?). That's the way Google handles "suggested contact" through their API, and not every contact I ever received an email from, spam included.
The closest thing to what you're looking for is the People API. As that page says:
The People API returns relevent person entities with each request. A person aggregates information from across mail, contacts and social networks. The results are ordered by their relevance, which is determined by the criteria specified in the request and ranked based on multiple communication, collaboration and business relationships.
The change in behavior in the beta version of the Contacts API is due to a change in how the API processes a request to the /me/contacts endpoint, and is under review. Keep in mind this is a beta so this may not be how the API ends up acting in stable versions.

Is there a unique identifier for a user across different Google APIs?

I am using google's oauth2 to allow users to register/login into my site (php library). The first time a user attempts to login I get the user's email address and google+ id which are provided by the Google OAuth2 API (with the user's permission).
In a different part of the site I need some information from the user's youtube channel. I am using the incremental authorization to get the extra permissions as it is recommended (and described here: https://developers.google.com/identity/protocols/OAuth2WebServer#incrementalAuth ).
The problem is that I don't have a unique identifier for the user between the calls, in order to keep track of him/her in my side of the application. A user, for example might have multiple youtube channels and each one can be associated with a different google+ account/id and a different email address, which most of the time is not a real address but a provided email with the format 'username-XXXX#plus.google.com'.
I was wondering if google's apis can return a unique identifier for the 'parent' account of a user across different apis.
Thanks in advance.

Using OAuth with Twitter in ASP.NET

I am using Twitter as an OAuth provider for ASP.NET MVC 4 web site. I would like to be able to follow up with a registered user at a later date, either by email or via a tweet. Outside of having the user follow me on Twitter, do I have any other options to communicate with the user?
Here is what I unsuccessfully considered:
It appears that there is no way to get access to the email address since Twitter OAuth API does not return it.
It appears I cannot send a direct message unless a user
follows me on Twitter.
"Read/Write/DirectMessage" permissions seem
too intrusive -- all I want to do is send a user a message that a
new product is released -- I don't need any of the write
capabilities that this level of permissions provides.
To recap, if a user used Twitter to sign in to my website, what are my options to contact that user at a later date?
Thanks.
Twitter's solution for this sort of person-to-person communication is the Direct Message, however, Twitter has (rightfully) decided that both parties need to consent to this channel being available. This decision is intended to reduce the amount of spam in the Twitter ecosystem.
Posting public tweets that mention the username will get your users' attention, but it is also broadcasting their relationship with your company to the entire Twitter ecosystem. You will, essentially, be advertising their relationship with your company without their permission. This approach will bring you headaches sooner or later.
Email is probably a better choice for the sort of announcement to existing customers.

Resources