I'm experimenting with the API for Office 365... I can see the results of this query okay:
https://outlook.office365.com/ews/odata/Me/Contacts?$select=DisplayName,EmailAddress1,Birthday,Categories
It shows the contacts stored against a certain user.
Is there an equivalent function for querying the contacts that are stored in the "Global Address List? The one you get to if you go to the "Admin" link and then the "Users and Groups" link.
Right now, the Office 365 API is based on the User giving the App consent to particular permissions. The Global Address List is not one of these right now. if this is something you are interested in, I would highly recommend submitted this to UserVoice where our engineering team is monitoring http://aka.ms/OfficeDevFeedback
Azure Active Directory Graph API will provide what you are looking for.
MSDN reference - "Get Contacts"
Newer documentation is at: https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/api-catalog
Related
I am currently working on a project where I am needing to find the active username (not the device name or hostname) of associates on the machines. Since there was no standard naming convention when the devices were provisioned, I am looking to find a way to figure out or see the last logged in users through Azure AD or Intune.
Not sure if I am making this post in the correct place, if not please be kind and suggest where I should post this.
Thanks!
To fetch the details of last logged on users on Intune, make use of below query in Microsoft Graph Explorer:
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices/{managedDeviceId}
The above query will only work on beta version of Microsoft Graph.
Please check the required permissions below:
In the output response, you can find the UserId and LastlogonDateTime in usersLoggedOn field.
In order to display the username via UserId, make use of powershell script mentioned in this reference.
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant. Beta version is subject to change don't use it for production.
For more information, please refer below links:
Get windowsManagedDevice - Microsoft Graph beta | Microsoft Docs
Find out last logon user of MDM assigned Coporate Device - Microsoft Q&A
Working in the Dynamics 365 Sandbox env. and the Docusign Demo env. I have 3 users, all mapped between the two systems. 1 of the users does not get the Docusign menu items displaying.
I have deleted the user in both systems and readded, but still does not work. I have reviewed that email addresses and names match. I have reviewed Docusign permissions are set to Admin for this user. I have done a hard refresh of the Dynamics page in the browser. I have called into Docusign support, but they suggested I reach out to this group as they could not assist.
Jonathan, this sort of question is better answered by opening a support ticket as we'll need to get your personal account information and ask questions specific to your case. It may or may not be relevant to the entire DocuSign community. If you don't mind doing that, you can go to https://support.docusign.com/ and do it from here.
I have the app that uses OneDrive API (MS graph) to access OneDrive free accounts and OneDrive for business.
The app works fine.
In docs of the API i can see same API can be used also to access Sharepoint Online sites data.
How to do this? When i auth a user who has Sharepoint Online account with MS graph, there is only his drive (ondrive) but there is no his site listed.
How to get access to his sharepoint site too using same API?
I have found how to work with sites using the Graph API.
To get list of sites there is the call
GET /v1.0/sites/
Then use the SITEID to get list of drives (in fact, top level folders)
GET /v1.0/sites/SITEID/drives
Then to get contents of a drive user
GET /v1.0/sites/SITEID/drives/DRIVEID/root/children
And all next calls are same as for onedrive drive
However, there is the problem i still can not solve. How to create new top level folder (new drive on a site). There is no API call for this
I believe what you are looking for is the sites API. It lets you interact with a SharePoint site if you know the path or the id of the site. You can find the documentation for the api here:
https://dev.onedrive.com/resources/site.htm
There is no easy way to discover sites as of now. You can however search for a site. You can read more about it here:
https://dev.onedrive.com/sites/search.htm
This endpoint to get the list of sites is not working, so the last answer is not valid anymore.
https://graph.microsoft.com/v1.0/sites
I haven't found a way to do this, the discovery of sites, without admin consent. If the admin consent flow is not a problem you can try this workaround, use the endpoint of groups to ask for the groups that the user is member of, and you can use the groups to get the document libraries of the user.
To get the groups:
GET https://graph.microsoft.com/v1.0/me/memberOf
With the group id, you can use this endpoint:
GET https://graph.microsoft.com/v1.0/groups/{group-id}/drive
So if someone know how to do the discovery of sites for a user without admin consent, please share.
EDIT: I'm not sure why my answer was deleted, my answer basically has 2 things:
I gave notice that one answer here is not valid anymore.
I gave a possible other solution to the problem.
Most of the posts I've read online about this are about a year old, or don't answer my question specifically. I know through the graph API you can view contacts and users, and you can add contacts and users, but when I've viewed the contacts and users through the graph API, they don't match what's in my global address list exactly. So I believe that they're not the same thing.
Also, a lot of the posts I've read asking questions similar to this have said adding users to the Global Address List is not supported through the Graph API and must be done programmatically through powershell or something like that. These answers though were posted around a year and a half ago. So I'm wondering if this still isn't possible through the graph API.
So firstly I'd like to understand why you indicate that the Global Address List is different from what you can get back from Graph API. As far as I know these should be identical, so please indicate where you are seeing differences. Also Azure AD PowerShell v2 calls through Graph.
As for updating the global address list, this is mostly possible through Graph API. If you are trying to add new users to your directory, you can POST on http://graph.microsoft.com/v1.0/users. Please see https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/users and https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_post_users. There are also PowerShell cmdlets for this. If you are trying to add organizational contacts, currently this is not supported through Graph API or through Azure AD PowerShell. Organizational contacts may be queried (currently only available in preview by doing GET https://graph.microsoft.com/beta/contacts), but adding org contact is only possible through creation in on-premises AD and synchronization though AD Connect OR via Exchange experiences (like Office portals or Exchange PowerShell).
Personal contacts may also be fetched and added through GET and POST https://graph.microsoft.com/v1.0/me/contacts respectively.
Hope this helps,
At present, it is not possible to add the users to Global Address List. We are only to add the person contacts to the root Contacts folder or to the contacts endpoint of another contact folder( refer here).
You can try to submit the feedback from here if you want the Microsoft Graph to support this feature.
I am trying to use the Office 365 API to write events to the calendars of anyone at our organization. This should not involve the users logging in to Office 365 at any point. The events to add are written out at various points during the day (when the user who would own the event may not even be at a computer), so the per-user token approach doesn't even make sense.
It appears that Microsoft provides an alternative that uses a service account. This account can be used to write to any user's calendar (or sending email as any user, etc.). However, I can't find any documentation on doing this. Could anyone provide a link to it?
I found a blog post on this topic: http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx
Also, if you aren't using Microsoft's client library for this (for example, if you use linux), you'll need to see this too: Office 365 Rest API - Daemon week authentication