Microsoft Graph API: ad permission to SharePoint file for a sharepoint group - microsoft-graph-api

i want to add a permission to a file on sharepoint online using the Microsoft Graph API.
the special thing is that i want to grant permission to the sharepoint group "visitors of ".
i think the possibility using https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=http is not successful.
thanks everyone
https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0&tabs=http
tried this with different recipients and roles.

Related

Move email from Inbox to Microsoft group mailbox in Outlook web add-in

I am working on custom outlook web add-in where I need to move the email from my Inbox to the selected Microsoft Group mailbox programmatically.
I checked the move-message endpoint https://learn.microsoft.com/en-us/graph/api/message-move but that requires destination folder Id which I am not able to get it.
Is this possible using Graph API or any other way?
The Graph API doesn't support moving messages between mailboxes so what you described wouldn't work at least with the move operation even if you had the Id. There are also some limitations around shared mailboxes in add-ins https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/delegate-access?tabs=windows

Get Team's Planner using App Only permission in Azure Function

Is there any example how I can achieve following requirement:
I need to read Planner Plans from Group in an Azure Function trough Graph Api.
Application permissions are not supported, only delegated.
I tried with ConfidentialClientApplicationBuilder with OnBehalfOfProvider, but no luck. I do not know how to set UserAssertion in this case.
Also, username and password flow is not an option, because end user can use MFA.
Unfortunately Microsoft Planner APIs on Microsoft Graph do not support Application permissions (App-only) . This is confirmed in the docs here https://learn.microsoft.com/en-us/graph/api/planner-post-plans?view=graph-rest-1.0&tabs=http#permissions
Please vote up the feature request for this https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/5904632-application-permissions-to-task-api

What API do I use with the permissions my Teams app received in App Studio?

I am developing an app in Microsoft Teams using the App Studio. Towards the end of the proccess, in the section Domains and Permissions, you are allowed to give resource-specific consent permissions such as File.Read.Group. I was wondering where I would use these permissions (Microsoft Graph, Azure AD Graph, ...) to programmatically access an API. As a side question, does anybody know which permission allows the app to manage group members?
Thank you!
Here is a good read on that permissions settings page, those consent permissions are not actually a part of azure ad app registrations as of this articles writing. so that means while they are sort of graph permissions, you would use them against the graph api. They are for specific teams based resource specific permissions.
https://blog.thoughtstuff.co.uk/2020/01/microsoft-teams-has-a-new-more-granular-and-resource-specific-permissions-model-for-apps-what-is-resource-specific-consent-rsc-and-how-do-i-use-it/
the official documentation on the matter: https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent
as per the microsoft link i don't see a resource specific permission to "edit" groups members.

Microsoft Graph API: Is there a way to get the user's acitivity feed of teams?

We want to get the number of acitivities for a user, which is also shown as badge in the teams app.
I didn't found any direct way. Does anyone found a way to achieve this indirectly?
There is no such way to get all the activity of an user in Teams.
You can look into Subscription Graph API. It allows a client app to receive change notifications about changes to data in Microsoft Graph. Currently, subscriptions are enabled for the following resources:
An alert from the Microsoft Graph Security API
A conversation in an Office 365 group
Content in the hierarchy of a root folder driveItem
in OneDrive for Business, or of a root folder or subfolder driveItem
in a user's personal OneDrive
A list under a SharePoint site
A message, event, or contact in Outlook
A user or group in Azure Active Directory
See Use the Microsoft Graph API to get change notifications for the possible resource path values for each supported resource.

How do you add the "Reports.Read.All" permission so you can use the Graph explorer to run the Office 365 usage reports?

I'm trying to use the graph explorer to access the beta Office 365 usage reports. I can see that these report require the "Reports.Read.All" permission and I'm seeing that the account I'm using doesn't have that permission yet, but when I click on the "Modify your permissions" link it doesn't display this permission. How do you add this permission to an account, so that you can use the graph explorer with this API?
The reports.read.all permission has been added to the Graph Explorer code repository at https://github.com/microsoftgraph/microsoft-graph-explorer/commit/093600ec7bc7bd32befe5d118270ea71ca8008b4 and will be deployed to our website in the next update. We're working on a process to get new scopes added to the explorer automatically so we don't have this delay in the future.
You need to be an administrator to be able to consent to that permission scope

Resources