You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect type for "Identity" in "IdentitySet" #116
The type Identity seems to be different from what the API is returning. This error occured for us when retrieving the identity of the creator of the document using the createdBy.user field on a DriveItem.
Expected (declared in microsoft-graph.d.ts line 8736)
This is expected behavior per the metadata. This is an OpenType which means that undefined properties may be returned in this object. Additionally, id and displayName are nullable so it is expected that they may not be present in a response.
Thank you for your answer. I was not clear but the issue is precisely about the email property being absent in the types and returned by the API. No problem with some properties being optional.
I apologize, I somehow missed the previous notification from GitHub.
So there are two questions:
Why is id missing?
Why is email a dynamic property instead of being present in the schema?
For the former it will be useful to understand the scenario - was this a call against SharePoint or OneDrive Personal? what API was being invoked?
For the latter - off the top of my head I don't see why this cannot be the case. There will be times when there is no email (e.g. if the identity represents a device) and so the value would be nullable but from that's essentially no different to todays state.
In the case that the identity represents a device, it would also make sense to me that the email is nullable. However, (a) it is currently not documented (neither in the typings nor in the docs) and (b) it seems to be not consistently set for regular users as in my previous point.
Any kind of inconsistency should be viewed as a bug so we'll investigate what's going on with the delta API. Are there any other APIs that you've noticed missing id values?
Not that I know of, at the moment. Is there a better place to report those inconsistencies than the typings or docs repositories? Then I can report back there if I can consistently reproduce missing values using the Graph Explorer.
Hi Maarten Sijm (@mpsijm) we recently pushed a change that should result in delta populating the id for identity objects that represent a user/group. Could you confirm that things are looking more consistent for you now?
Brad (@ificator) Yes, on first sight it looks like it's been fixed, thanks 😄 Still need to some more thorough testing, if I find anything weird I'll report back 🙂
The email field now also seems to show up consistently in the response data (if the user has an email, of course), even though that field is still undocumented (see my second point in #116 (comment)).
Hello Maarten Sijm (@mpsijm) , could you please tell me how do you make the email and id of a user showing up consistently in the response CreatedBy filed.
MS Graph API is GET /drives/{drive-id}/items/{item-id}
For some users, the email and id are missing in the response.
aigolang I did not do anything specific for this. The change in the API from #116 (comment) appeared to have fixed things, and we did not run into any issues since then. I still do not know under what circumstances some fields may be empty 😅
Activity
MIchaelMainer commentedon Feb 4, 2020
This is expected behavior per the metadata. This is an OpenType which means that undefined properties may be returned in this object. Additionally,
idanddisplayNameare nullable so it is expected that they may not be present in a response.Brad (@ificator) and Barry Shehadeh (@BarryShehadeh) It seems like the
emailproperty should be schematized.arthur-caillaud commentedon Feb 5, 2020
Thank you for your answer. I was not clear but the issue is precisely about the
emailproperty being absent in the types and returned by the API. No problem with some properties being optional.mpsijm commentedon Oct 26, 2020
I also ran into this issue. Any updates on this?
ificator commentedon Oct 26, 2020
I apologize, I somehow missed the previous notification from GitHub.
So there are two questions:
idmissing?emaila dynamic property instead of being present in the schema?For the former it will be useful to understand the scenario - was this a call against SharePoint or OneDrive Personal? what API was being invoked?
For the latter - off the top of my head I don't see why this cannot be the case. There will be times when there is no email (e.g. if the
identityrepresents a device) and so the value would be nullable but from that's essentially no different to todays state.mpsijm commentedon Oct 26, 2020
In my context, I'm using a SharePoint API. The exact same user sometimes has an
id, sometimes doesn't. Theemailproperty from that same user seems to be there most of the time, but not always. See also the scenario I posted here: https://github.com/microsoftgraph/microsoft-graph-docs-contrib/issues/4363.In the case that the
identityrepresents a device, it would also make sense to me that the email is nullable. However, (a) it is currently not documented (neither in the typings nor in the docs) and (b) it seems to be not consistently set for regular users as in my previous point.ificator commentedon Oct 31, 2020
Any kind of inconsistency should be viewed as a bug so we'll investigate what's going on with the
deltaAPI. Are there any other APIs that you've noticed missingidvalues?mpsijm commentedon Nov 1, 2020
Not that I know of, at the moment. Is there a better place to report those inconsistencies than the typings or docs repositories? Then I can report back there if I can consistently reproduce missing values using the Graph Explorer.
ificator commentedon Nov 1, 2020
For OneDrive / SharePoint API issues / questions the best place is https://github.com/OneDrive/OneDrive-api-docs. We generally only spot issues other repos when we're explicitly tagged.
ificator commentedon Nov 25, 2020
Hi Maarten Sijm (@mpsijm) we recently pushed a change that should result in
deltapopulating theidforidentityobjects that represent a user/group. Could you confirm that things are looking more consistent for you now?mpsijm commentedon Nov 27, 2020
Brad (@ificator) Yes, on first sight it looks like it's been fixed, thanks 😄 Still need to some more thorough testing, if I find anything weird I'll report back 🙂
The
emailfield now also seems to show up consistently in the response data (if the user has an email, of course), even though that field is still undocumented (see my second point in #116 (comment)).aigolang commentedon Mar 13, 2023
Hello Maarten Sijm (@mpsijm) , could you please tell me how do you make the email and id of a user showing up consistently in the response CreatedBy filed.
MS Graph API is GET /drives/{drive-id}/items/{item-id}
For some users, the email and id are missing in the response.
https://learn.microsoft.com/en-us/graph/api/resources/identity?view=graph-rest-1.0
In some circumstances, the unique identifier for the actor might not be available. In this case, the displayName property for the identity will be returned, but the id property will be missing from the resource.
What is the circumstance?
mpsijm commentedon Mar 13, 2023
aigolang I did not do anything specific for this. The change in the API from #116 (comment) appeared to have fixed things, and we did not run into any issues since then. I still do not know under what circumstances some fields may be empty 😅