Unable to Tell via Graph if Tenant has Teams Enabled - microsoft-graph-api

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.

Related

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.

Office365 - Get list of all Planner Plans

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.

Programmatically access Tags in Teams

I am building an application that creates Teams for my training classes and I can Create a Group, make it a team, and then add the required folks to the Members list. I want to be able to differentiate between "students" and "facilitators" for reporting and management.
I have found /api/v1/teams/{0}/memberTags/ but I don't seem to be able to call it directly or find it in the SDK documentation.
Is this API available?
Teams Tags are currently in the Graph beta
https://learn.microsoft.com/en-us/graph/api/resources/teamworktag
Tags provide a flexible way for customers to classify users or groups based on a common attribute within a team. For example, a Nurse or Manager or Designer tag will enable users to reach groups of people in Teams without having to type every single name.
Tags are scoped at the Team level.
When a tag is added, users can #mention it (#tag) in a channel in that team . Everyone who has been assigned that tag will receive a notification just as they would if they were #mentioned individually. Users can also use a tag is to start a new chat with the members of that tag.
No, there’s no API for this now .
Check here to Manage tags in Microsoft Teams app. We will keep you posted once this feature is available through API.

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