Answered

User and Team Management via API

  • 27 November 2020
  • 13 replies
  • 2278 views

Userlevel 1

Hi Miro Developer Community. Question - it seems like there is no way to do these things using the API:

  • List all users in the company, and their license level
  • List all teams in the company
  • Create a new team

Is that right? I saw another post saying that you can use Get Team User Connection to list team members and their role. But that’s just for one team. 

Is there another method for doing this? Or is there a plan to offer this in the API? Doing these things manually is real pain if your company has hundreds of users or hundreds of teams. 

 

Thank you in advance!

icon

Best answer by Daniela Gavidia 1 December 2020, 13:26

View original

13 replies

Userlevel 3
Badge +1

Hello Blake,

 

You are correct. At this moment, it is not possible to do the things in your list through the REST API. We have received many requests for this already and we are in the process of creating new API endpoints for this type of use cases. They will be available in a future release of the API.

 

Kind regards.

 

Daniela

Userlevel 1

Thank you Daniela, do you have any idea about when the next release will be? Even a rough estimate would be useful.

Thanks

I came here looking for exactly the same information as @Blake Cottington.  I was planning to create an Angular front end to allow for better management of our Miro environment.  So far I’ve built a Collection in Postman to better familiarize myself with Miro’s APIs, auth, etc.  I assumed I was just missing this one, but the fact that I can’t GET a list of all of my teams is a non-starter for me.

 

Does Miro have a Developer beta program, or perhaps Beta Endpoint where these type of features are rolled out and can be evaluated by us?  That would align well with Microsoft’s Graph architecture, and would help us get started at least.  

 

Thanks!

Bill

Userlevel 3
Badge +1

Hi @Blake Cottington, unfortunately, I cannot give you an estimate for the next release just yet. The platform team is working hard on putting things together for the next release. We intend to improve many things, so the launch date is still undecided.

 

@Bill Miller As we get closer to the next release, we might consider a developer beta program. At the moment, we do not have one, but it is a great idea. I will pass it on to the team.

 

Kind regards.

 

Daniela

Developer Experience Team

Userlevel 1

@Daniela Gavidia 

Update: I didn’t realize this before but I am able to get a list of users (with license levels) and a list of teams using SCIM. 

But we still really need a programmatic way to create new teams.

+1 For the option to create teams via the API. This would be a very useful feature indeed.

Another +1 for the option to create teams via API. We have a large devolved environment and would like to have an automated workflow whereby staff can request a new team and have this approved by an appropriate person, who may not be a company admin.

Do you have any updates?

Hi,

As mentioned above through SCIM using the v1 you have options to automate and manage in a big scale using your own way, what is missing is at least some info like last activity but it is already requested to the PG. I’m using a posh to extract al users, groups and members and then I’m using this info in a PowerBI with merge of last activity from the export of all users from admin portal. Here you have sample powershell: 

$token="YOURTOKEN"

$pathUsers="C:\temp\Miro\"

$pathGroups="C:\temp\Miro\MiroGroups\"

$headers=@{}

$headers.Add("content-type", "application/json")

$headers.Add("authorization", "Bearer $Token")

$responseFilter = Invoke-WebRequest -Uri "https://miro.com/api/v1/scim/Users" -Method GET -Headers $headers -ContentType 'application/json'

$newResponse=$responseFilter | ConvertFrom-Json

$collUsers = New-Object System.Collections.ArrayList

foreach ($r in $newResponse.Resources)

{

    $arrG=""

    foreach ($item in $r.groups) {

        $arrG+="|"+$item.value

    }

 

    $temp = New-Object System.Object

    $temp | Add-Member -MemberType NoteProperty -Name "id" -Value $r.id

    $temp | Add-Member -MemberType NoteProperty -Name "email" -Value $r.emails[0].value

    $temp | Add-Member -MemberType NoteProperty -Name "userType" -Value $r.userType

    $temp | Add-Member -MemberType NoteProperty -Name "status" -Value $r.active

    $temp | Add-Member -MemberType NoteProperty -Name "Groups" -Value $arrG

 

    $collUsers.Add($temp) | Out-Null

}

$collUsers |Export-Csv $pathUsers\miro_users.csv

$responseG = Invoke-WebRequest -Uri 'https://miro.com/api/v1/scim/Groups' -Method GET -Headers $headers -ContentType 'application/json'

$newResponseG = $responseG | ConvertFrom-Json

foreach ($rG in $newResponseG.Resources)

{

    $collGroupX = New-Object System.Collections.ArrayList

foreach ($item in $rG.members) {

    $temp = New-Object System.Object

    $temp | Add-Member -MemberType NoteProperty -Name "id" -Value $rG.id

    $temp | Add-Member -MemberType NoteProperty -Name "displayName" -Value $rG.displayName

    $temp | Add-Member -MemberType NoteProperty -Name "membersCount" -Value $rG.members.Count

    $temp | Add-Member -MemberType NoteProperty -Name "user" -Value $item.value

    $collGroupX.Add($temp) | Out-Null

}

$collGroupX |Export-Csv "$pathGroups$($rg.id)"

}

+1 to create Teams

+1 to Downgrade License

+1 to get Last Activity

@Xavier Martinez where is the documentation of V1 SCIM API? 

I've tried to enable SCIM but it's asked to enable SSO, something that I don't want it. 

@Daniela Gavidia

Update: I didn’t realize this before but I am able to get a list of users (with license levels) and a list of teams using SCIM. 

But we still really need a programmatic way to create new teams.

@Blake Cottington How did you get it?

Userlevel 1

@rafasalo you have to

  1. Go to Miro account security settings and make sure SCIM Provisioning is enabled, and make note of the API token
  2. Then you can make a GET to https://miro.com/api/v1/scim/Users and send the API token in the request header as:
    Authorization: “Bearer API-TOKEN-HERE”
  3. You can do the same with teams using https://miro.com/api/v1/scim/Groups

See
https://developers.miro.com/docs/scim-users

https://developers.miro.com/docs/scim-groups

 

Seems like there’s still no way to create teams...

Reply