SOLVED

Graph api to list one drive for business users

Copper Contributor

Hi ,

I am looking for an end point in microsoft graph api which could help me to list all the users in my azure ad who are having access to one drive for business. I have gone through many blogs and sites but i could not find any information on it. Can anyone here please help me with that!

 

Thanks in Advance :)

3 Replies
best response confirmed by Desusai (Copper Contributor)
Solution

There's no single endpoint/query that can give you that information. You can either get the list via SPO PowerShell or CSOM, or alternatively get a list of all the users, then for each user check for the presence of ODFB via the /drive/root endpoint. Here's a sample script I wrote a while back: https://github.com/michevnew/PowerShell/blob/master/Graph_ODFB_shared_files.ps1

Thank you @Vasil Michev . It was nice idea

@Desusai Thanks for your question and I'm glad you got it solved!

For future reference, you've posted your question in the Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions.

 

I'm moving your question to the Microsoft Graph space- please post Microsoft Graph questions here in the future. 

1 best response

Accepted Solutions
best response confirmed by Desusai (Copper Contributor)
Solution

There's no single endpoint/query that can give you that information. You can either get the list via SPO PowerShell or CSOM, or alternatively get a list of all the users, then for each user check for the presence of ODFB via the /drive/root endpoint. Here's a sample script I wrote a while back: https://github.com/michevnew/PowerShell/blob/master/Graph_ODFB_shared_files.ps1

View solution in original post