microsoft-graph

How does an admin grant access to an app?

家住魔仙堡 提交于 2019-12-24 17:20:53
问题 I have made a web app that using Microsoft Graph and the scopes profile , openid , email and User.Read . This works fine. I now want to include offline_access , User.Read , Mail.Send , Calendars.ReadWrite , Directory.ReadWrite.All , Directory.AccessAsUser.All , User.Read.All , Files.ReadWrite.All , Files.Read , Files.ReadWrite , and Sites.Read.All scopes. When trying to login I get the message: You can't access this application. Tutorial Sample App needs permission to access resources in your

.NET Graph SDK - OneDrive File Upload Fails with “Unsupported segment type”

旧城冷巷雨未停 提交于 2019-12-24 17:09:28
问题 Trying to upload file using the .NET SDK for Microsoft Graph. Here is the code: DriveItem file = new DriveItem() { File = new Microsoft.Graph.File(), Name = filename, ParentReference = new ItemReference() { DriveId = parent.ParentReference.DriveId, Path = path + "/" + filename } }; var freq = _client .Me .Drive .Items[parent.Id] .Children .Request(); // add the drive item file = await freq.AddAsync(file); DriveItem uploadedFile = null; using (MemoryStream stream = new MemoryStream(data)) {

How can I create a planner task with a description?

岁酱吖の 提交于 2019-12-24 14:27:56
问题 I'm using the Microsoft Graph API with the .Net SDK. I'm trying to create a new PlannerTask, and provide a description with it when doing that. The description for a PlannerTask is on a related object, PlannerTaskDetails, and so that object is "read-only". This seems to imply that to create a PlannerTask with a Description I have to make at least two calls. The first call creates the PlannerTask, and the second call updates the PlannerTaskDetails. To update the PlannerTaskDetails, an e-tag is

Modifying MS Graph responses for display on site

做~自己de王妃 提交于 2019-12-24 12:16:41
问题 I have a c# Web App that connects to Azure AD B2C directory with MS Graph to display user data. I'm looking for a best practice way to display the contents returned by Graph Query. I could always do straight forward string formatting, but I'm looking for something more optimal. I use HttpResponseMessage httpmsg = await QueryGraphAsync("/users?$select=displayName"); and the response looks like this : {"@odata.context":"https://graph.microsoft.com/beta/$metadata#users(displayName)","value":[{

No Sufficient Data Content of User When Calling Microsoft.Graph Compared to Microsoft.Azure.ActiveDirectory.GraphClient

白昼怎懂夜的黑 提交于 2019-12-24 11:00:09
问题 I want to change my code from Microsoft.Azure.ActiveDirectory.GraphClient to Microsoft.Graph on the same registered App. On some data structure(e.g. Group, Company), the fetched data are the same. but the fetched data of User are different. (I am using the V1.0 of the Graph API.) For example, when I try to fetch certain user by its upn. The old method is to call: graphClient.Users.Where(user => user.UserPrincipalName.Equals(upn)).ExecuteSingleAsync() //graphClient is an instance of

how to get all tasks from outlook with Microsoft Graph or Office 365 REST API?

二次信任 提交于 2019-12-24 10:56:17
问题 I am building a web application that needs to fetch all tasks from an organization that uses Outlook Task. Can this be done with Microsoft Graph or Office 365 REST API? I haven't found any calls in the documentation of either services that would do something similar to that: https://outlook.office.com/api/v2.0/tenant/tasks Should I find another approach or is it something that is doable? 回答1: Outlook Tasks is available in Preview on Microsoft Graph today: GET /users/{id|userPrincipalName}

Microsoft Graph API error “Required scp claim values are not provided”

我们两清 提交于 2019-12-24 10:38:57
问题 Given I'm logged in with MSSSO account; And the Read the organization's roster permission is set; When I call /education/me/classes endpoint; Then I get the 403 response with the code AccessDenied and the message Required scp claim values are not provided . What does the error mean? How do I fix it? { "aud": "https://graph.microsoft.com", "iss": "https://sts.windows.net/22d54f2b-1771-400c-8839-1b661d1d5270/", "iat": 1517909669, "nbf": 1517909669, "exp": 1517913569, "acr": "1", "aio":

Calling Microsoft Graph in a service or daemon app using client assertions instead of using client secret?

拈花ヽ惹草 提交于 2019-12-24 08:47:01
问题 The url https://developer.microsoft.com/en-us/graph/docs/authorization/app_only describes how a service or daemon app can use the client secret configured in the Microsoft Application Registration Portal and obtain access tokens. The Application Registration Portal has a 'Generate New Key Pair' button to generate public/private key pair. Is there any documentation that describes how to use public/private key pairs and use it to get the access token instead of client secret? Also i am always

How do i display files from a users OneDrive using the Microsoft Graph Api

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 08:37:23
问题 I'm currently working with the OneDrive API to get files from a users OneDrive. I need to be able to display a file from OneDrive dynamically, depending on what element a user clicks on. I Know that I can go into my OneDrive and get a Embedded Link that I can use to display a file from my OneDrive, but this is not what I need. I attempted to use the Embedded Link combined with data binding but the link requires a authorization token unique the initial embedded link. Essentially I want a user

How to create users using Microsoft Graph API (from Graph explorer and Java application)

落花浮王杯 提交于 2019-12-24 08:36:17
问题 I am new to Microsoft Graph API. I have read many articles on the web to understand the usage of Microosft Garph API for managing users in Azure AD. I am creating a Springboot based REST API service, which needs to create users in Azure AD. I have registered my application in Azure Active Directory. I have also 'Directory.ReadWrite.All" permission for Microsoft Graph API. I wanted to first try to create the user from Microsoft Garph explorer. In the Graph Explorer, I have to give