Possible resource types in Microsoft

Bohdan Sokhatskyi (bsokhats) 21 Reputation points
2022-11-03T13:58:32.783+00:00

Hello. I`m working on integration project which retrieves imfromation about Groups and their members from Microsoft Graph. The thing is, for our purposes we need to know exactly what type of member is coming from the MS(microsoft.graph.user, microsoft.graph.group etc). It is coming in a "@odatatype" property. So I want to know all the possible values for this "@odatatype" to be able to parse it properly in my code. But I can't find any documentation about it on the web. Except of some peaces of inforamtion here https://learn.microsoft.com/en-us/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0&tabs=http (see first paragragh)
Here is a screenshot of our db where you can see that previously we have stored values like "MailUser" without "#" notation.
![256760-image.png]1
So is there any rule for "@odatatype" property or smth?
Thanks

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Answer accepted by question author
  1. Michael Taylor 61,101 Reputation points
    2022-11-03T14:13:16.907+00:00

    No. Even if there were your code would be out of date as soon as you released it. As with most open ended sets of values you should code for the values you know about and ignore everything else. There is no other way to properly handle this situation. New types could be added without notification and you wouldn't want your code to break.

    If you care about mailboxes, for example, then run some queries to see what type(s) you are getting back and code for those. If you also want to handle users then do the same thing. Any that you don't recognize you can either ignore or perhaps log a warning somewhere so you can review whether you should be handling them or not.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bohdan Sokhatskyi (bsokhats) 21 Reputation points
    2022-11-03T15:17:09.133+00:00

    That's sad, but ok. I think we can do it the way you said. Thanks

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.