office365

SharePoint Error using Office 365 REST API OAuth access_token

前提是你 提交于 2020-01-13 06:56:31
问题 I am developing a rather simple application that retrieves files from SharePoint using the REST Office 365 API. This is a batch job running in the background with no user interface so the following simple 2-step flow is what I'm doing: (1) Requesting an Access Token from Azure AD (supplying client ID, client secret, resource, and grant_type=client_credentials) (2) Invoke the SharePoint API ( https://{base url}/_api/v1.0/Files ) using the "Authorization: Bearer " as a request header . That

Microsoft Graph: List all users and their groups in one request

两盒软妹~` 提交于 2020-01-11 01:29:29
问题 I would like to list all users. For each user, I need to display the roles and groups specific to that user. I tried: https://graph.microsoft.com/v1.0/users?$expand=memberOf But it gives exactly the same result as: https://graph.microsoft.com/v1.0/users According to the doc for the user object (http://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/user), I should be able to list the roles and groups for the user by using the memberOf relationship. I can get the roles and groups I

How do I create an auth token with the new microsoft graph api?

三世轮回 提交于 2020-01-10 19:50:29
问题 I've been using this: https://github.com/Azure-Samples/active-directory-php-graphapi-web.git to access the graph api, which works. My azure AD registered application is able to query the API to get a list of users in the directory. But now I want to list folders for a user in the directory. This page http://graph.microsoft.io/docs says the url should be: https://graph.microsoft.com/v1.0/me/drive/root/children When I use that url in my REST call, I get "code": "InvalidAuthenticationToken",

How to access shared calendars from Office REST API?

北战南征 提交于 2020-01-10 04:21:26
问题 This question has been asked several times and as per answers such as this it seems the API didn't support this then until recently as here which mentions that there are new scopes which allow accessing the shared calendars. But it still does not work. I have tested this on two platforms: Azure and Microsoft Graph Azure Ad App My application in Azure AD has all the required permissions: I make a call to Office API v.1.0 as: Authorise URL: https://login.microsoftonline.com/common/oauth2

Automatically Log-In To Office 365

纵然是瞬间 提交于 2020-01-07 09:26:44
问题 My manager asked me to do research if the situation below is doable: A student log in to a web portal provided by his university. After logging in successfully, the student can use different web applications like Blackboard Learn, Office 365 etc. If the student choose to use Office 365, the student will automatically be logged into Office 365 without typing username and passwords (currently, we provide a link to Office 365 log in page, then the students have to manually type in their username

C# get Office ClickToRun Registry Key returns null

China☆狼群 提交于 2020-01-07 09:21:00
问题 I whant to get some Information from the Registry Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration". For some case I do not get the registry key object. For troubleshooting I've tryed the following: RegistryKey k2 = Registry.LocalMachine.OpenSubKey("SOFTWARE"); RegistryKey k3 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft"); RegistryKey k4 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Office"); RegistryKey k5 = Registry.LocalMachine.OpenSubKey(

Adding an additional Windows Azure AD delegated permission to an existing grant

我与影子孤独终老i 提交于 2020-01-07 07:15:07
问题 I've got an in-production Windows Azure AD App which authenticates users via OAuth2. Currently, it requests only one delegated permission - "Enable sign on and read users' profiles". I'm adding a new feature to our application which will make use of the Office 365 API(s), and this obviously requires additional delegated permissions to be requested by the App. I've updated our App manifest, and new users who give consent to our App grant both the sign-in and the Office 365 delegated

Adding an additional Windows Azure AD delegated permission to an existing grant

巧了我就是萌 提交于 2020-01-07 07:15:05
问题 I've got an in-production Windows Azure AD App which authenticates users via OAuth2. Currently, it requests only one delegated permission - "Enable sign on and read users' profiles". I'm adding a new feature to our application which will make use of the Office 365 API(s), and this obviously requires additional delegated permissions to be requested by the App. I've updated our App manifest, and new users who give consent to our App grant both the sign-in and the Office 365 delegated

Microsoft Graph API - 403 Forbidden for v1.0/me/events

泪湿孤枕 提交于 2020-01-07 06:44:31
问题 I'm building a page with numerous calls to Microsoft Graph to different end points: to get OneDrive files, emails, user properties, etc. The one call that does not work is to get the current user's calendar events. The end point I'm using is https://graph.microsoft.com/v1.0/me/events . The response is 403 Forbidden. According to the Microsoft documentation here the application needs Calendars.Read or Calendars.ReadWrite permissions. I checked both of these under delegated permissions and

Get events of a specific time range

柔情痞子 提交于 2020-01-07 03:08:08
问题 I'm working with the Office365 Outlook Calendar API. I need to get events of a specific time range. I tried to compare the DateTimeTimeZone values inside of the foreach command, but it seems like it only supports a == operator: if ( calendarEvent.Start >= new DateTimeTimeZone() { TimeZone = TimeZoneInfo.Local.Id, DateTime = DateTime.Now.ToString("s") }) This code snippet fails with the error: Cannot apply operator '>=' to operands of type 'Microsoft.Office365.OutlookServices.DateTimeTimeZone'