Office365 - Get list of all Planner Plans - microsoft-graph-api

I would like to retrieve a list of all Planner Plans and number of tasks in each Plan. Goal is to understand which plans are actually in use. I used the Graph API for this. However it appears that most the Graph endpoints for Planner and Tasks use Delegation Permissions. In other words, I have to be part of each Planner Plan to even query for it. So even as Global Admin I am unable to pull this information. Is there any way to query for
List of ALL Planner Plans in the tenant
Owner for each Planner Plan
Number of tasks in each Plan
Thanks in advance,
Jake

You can now use application permissions to read this data.
Outdated reply:
Unfortunately it is not possible to get this through Microsoft Graph
API right now. However we do have another API, which is meant for
admins to be able to export their tenant's data, and it can be used to
get this information. You should contact support for this process.

Related

How to get a list of active PSTN calls in Teams using the Microsoft Graph API

We're looking for a way to get a list of all currently active PSTN calls being made into MS Teams. We've tried this:
https://learn.microsoft.com/en-us/graph/api/callrecords-callrecord-getpstncalls?view=graph-rest-beta
That's almost exactly what we need except records do not seem to appear here until the call has ended. What we need for the app we're trying to build is live call records.
We've also tried it by creating subscriptions and getting the ID of specific calls then looking up call records, but this data also appears to be delayed.
Is there a method we're missing here, or equally, is this something that may be added to the API some point soon?
Currently there is no graph API to get a list of active PSTN calls in Teams.
Microsoft will always focus on customer’s feedback and experience, some new features would be added to the services based on customers' feedback in the future, we also recommend you give your new idea in Teams UserVoice here.
They clearly mentioned in the document, we can not fetch the details directly. But you can fetch the records from your application. Using app side bearer token.

How to scope a specific Graph API permission to a specific user or mailbox

According to Microsoft Docs, there is a way to scope Graph API application permissions to specific users / mailboxes with a command like this:
New-ApplicationAccessPolicy -AppId e7e4dbfc-046f-4074-9b3b-2ae8f144f59b -PolicyScopeGroupId EvenUsers#contoso.com -AccessRight RestrictAccess -Description "Restrict this app to members of distribution group EvenUsers."
In this case, the application can use all its allowed application permissions (e.g. Mail.Send, Calendars.Read) on the members of the group EvenUsers.
But what if I want to scope a specific permission to a specific group? For example, the application is allowed to send mails as users in group X and is allowed to read the calendars of the users in group Y but not vice versa.
Is this possible?
As far i know, its applicable to specific users or mailboxes; not heard for groups (see comment)
Still if you think you need such granular permissions consider filing an uservoice or upvote to the related ones, so Microsoft can consider implementing it. The closest uservoice i remember is this.

Unable to Tell via Graph if Tenant has Teams Enabled

Currently, Microsoft Graph does not appear to provide a way of checking whether a tenant has Microsoft Teams enabled.
Is there way to do this?
According to your descriptions, you want to check whether a tenant has Microsoft Teams.
There is a document on how to list Joined Teams. Only the beta version has this interface.
Base on my test, we can use the API like this:
GET https://graph.microsoft.com/beta/me/joinedTeams
It will list the teams that we joined.

Microsoft Graph API - /me/people does not return desired result

I'm working on a project using Microsoft Graph API. This project uses /me/people to get data.
According to Microsoft: "Microsoft Graph applications can use the People API to retrieve the people who are most relevant to a user. Relevance is determined by the user’s communication and collaboration patterns and business relationships. People can be local contacts, contacts from social networking or from an organization’s directory, and people from recent communications (such as email and Skype)."
According to this, I think that the result can be confirmable.
For example, I have 3 users account: user1#tnv.onmicrosoft.com, user2#tnv.onmicrosoft.com, user3#tnv.onmicrosoft.com. I put them in the same AAD security group named AADTestGroup.
I expect that when user1 calls /me/people, the result contains user2 and user3. However, it does not returns as expected.
The questions are:
What am I missing here?
How could I organize user accounts in O365 to get confirmable result from /me/people?
How long does this function take to reflect changes from Office 365?
Being in the same security group isn't a relevant "communication and collaboration pattern" or "business relationship". Until you have sufficient activity between these users, they will not show up in the result. Try editing the same document, emailing each other, etc. and they will begin to show up.

MS Graph API endpoint /v1.0/me/planner/plans doesn't return all my plans

In the past I was reading a list of plans of current user with this REST call of the beta-API:
https://graph.microsoft.com/beta/me/plans
In July 2017 the planner API was released and there are also some minor changes to the endpoints, so the REST call in the V1.0-API now is:
https://graph.microsoft.com/v1.0/me/planner/plans
Unfortunately I do not receive all my plans with that endpoint. Apparently I only get plans that exist for a long time, but any newly created plans are not visible. I tried a lot of actions on my plans like subscribing to, assigning tasks to me, favorize the plan in planner hub, making a plan public or private, but nothing helps, new plans remain invisible in the API.
Can anybody explain what the new endpoint exactly does? The documentation for List plans is not very helpfull.
Can anybody explain how I can a list of all plans (title and id) that I am owner or member of?
The only work-around I have found so far is:
1) Read all unified groups
https://graph.microsoft.com/v1.0/me/memberOf/$/microsoft.graph.group?$filter=groupTypes/any(a:a eq 'unified')
2) for each group: read the planner plan for that group
https://graph.microsoft.com/v1.0/groups/<id>/planner/plans
But that would require one request per group, makeing performance horrible on tenants with dozens of groups.
This API returns plans that have been shared with the current user. Plans can be shared with a user by adding the user's id to sharedWith property of planDetails (Edit: currently users do not have permissions to add or remove others from this list). This is a separate set of users from group membership and does not allow access to data for shared users. Instead, the users will have access if they are group members, and lose access if they are removed from the group.
More information and a sample for updating plan details can be found here.
Additionally, you can submit feedback about the API (and other Planner functionality) here.

Resources