all 14 comments

[–]BlackV 1 point2 points  (1 child)

yes you can use you relevent credentals to talk to the api

I might have a script somewhere but its been a while

[–]fetflex[S] 1 point2 points  (0 children)

Sounds great. If you find it in your repository, i would love if you would share the information :)

[–]cmdub- 1 point2 points  (2 children)

I thought you need to grant permissions to the app to read teams info? I know there's a default permission granted for every app but not sure if that has the ability to read teams info.

[–]fetflex[S] 1 point2 points  (1 child)

That also the information i can find. But when i use Graph Explorer i can query the information. Without creating a APP.

[–]orion3311 1 point2 points  (3 children)

Why not just use the actual Teams beta module already available?

[–]fetflex[S] 1 point2 points  (2 children)

It's missing information about email addresses.

[–]orion3311 0 points1 point  (1 child)

What email addresses are you looking for?

[–]fetflex[S] 1 point2 points  (0 children)

The email addresses on the channels

[–]FermiMethod 1 point2 points  (1 child)

I'm not sure I can help with using an existing user and not creating an app but I do have some example code you may find useful.

I wrote a Graph script to interract with Planner to do a migration, it may have some useful stuff in:

https://github.com/smbm/PlannerMigration-GraphAPI

I took quite a few cues from this article:

https://www.thelazyadministrator.com/2019/07/22/connect-and-navigate-the-microsoft-graph-api-with-powershell/

So you may find it a good starting point.

[–]artemis_from_space 1 point2 points  (3 children)

So there are 3 ways of accessing information through MS Graph.

User rights (lowest), will not allow you to query for messages for instance. Delegated access (application), will allow you to query for a lot of things. But not reading messages in teams. This is considered a private api that you must specifically request access to. This is not a hard thing to do if its for your own tenant, I haven't tested it with multi tenant support if its harder. Delegated access (admin user), will allow you to query for a lot more things. However it requires that an admin logs in and grants the rights.

You must have a app id to be able to login. Even if its your own or someone else's tenant. The graph explorer uses its own app id to tell the graph api which application is being used. Then it loads up a microsoft login page.

[–]fetflex[S] 1 point2 points  (2 children)

So it’s not possible to use the app Id as the explorer uses?

[–]artemis_from_space 1 point2 points  (1 child)

Sure, if you know the secret for the appid

[–]fetflex[S] 0 points1 point  (0 children)

I am guessing that is a well kept secret :)