Home

Teams REST API : Incorrect 'User Name' being returned in API

%3CLINGO-SUB%20id%3D%22lingo-sub-296685%22%20slang%3D%22en-US%22%3ETeams%20REST%20API%20%3A%20Incorrect%20'User%20Name'%20being%20returned%20in%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-296685%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EIf%20we%20post%20a%20message%20through%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-post-chatthreads%3Fview%3Dgraph-rest-beta%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%2FchatThreads%3C%2FA%3E%26nbsp%3Bbeta%20API%20and%20when%20we%20fetch%20the%20conversation%20with%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-list-messages%3Fview%3Dgraph-rest-beta%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%2Fmessages%3C%2FA%3E%26nbsp%3Bbeta%20API.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EExpected%20JSON%20was%20this%20%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3E%22from%22%3A%20%7B%3CBR%20%2F%3E%22application%22%3A%20null%2C%3CBR%20%2F%3E%22device%22%3A%20null%2C%3CBR%20%2F%3E%22conversation%22%3A%20null%2C%3CBR%20%2F%3E%22user%22%3A%20%7B%3CBR%20%2F%3E%22id%22%3A%20%22%3CUSER-ID%3E%22%2C%3CBR%20%2F%3E%22displayName%22%3A%20%22John%20Doe%22%2C%3CBR%20%2F%3E%22userIdentityType%22%3A%20%22aadUser%22%3CBR%20%2F%3E%7D%3C%2FUSER-ID%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%3EWhat%20I%20am%20getting%20is%20this%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3E%22from%22%3A%20%7B%3CBR%20%2F%3E%22application%22%3A%20null%2C%3CBR%20%2F%3E%22device%22%3A%20null%2C%3CBR%20%2F%3E%22conversation%22%3A%20null%2C%3CBR%20%2F%3E%22user%22%3A%20%7B%3CBR%20%2F%3E%22id%22%3A%20%22%3CUSER-ID%3E%22%2C%3CBR%20%2F%3E%22displayName%22%3A%20%22orgid%3A%3CUSER-ID%3E%22%2C%3CBR%20%2F%3E%22userIdentityType%22%3A%20%22aadUser%22%3CBR%20%2F%3E%7D%3C%2FUSER-ID%3E%3C%2FUSER-ID%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20please%20comment%20as%20to%20why%20this%20error%20is%20occurring%20and%20when%20can%20we%20expect%20this%20to%20get%20fixed%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-296685%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EConversations%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-325461%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20REST%20API%20%3A%20Incorrect%20'User%20Name'%20being%20returned%20in%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-325461%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F187228%22%20target%3D%22_blank%22%3ENilay%2C%3C%2FA%3E%3C%2FP%3E%3CP%3EYes%2C%20when%20use%20chatthread%20API%20and%20specific%20user%20displayname%20show%20the%20wrong%20information.%20Others%20are%20fine%2C%20I%20think%20it%20should%20be%20a%20bug%20and%20need%20to%20be%20fixed....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFann%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-325459%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20REST%20API%20%3A%20Incorrect%20'User%20Name'%20being%20returned%20in%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-325459%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20issue%20is%20specific%20only%20to%20the%20user%20who%20posts%20the%20conversation%20through%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-post-chatthreads%3Fview%3Dgraph-rest-beta%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%2FchatThreads%3C%2FA%3E%20beta%20API.%3C%2FP%3E%3CP%3EFor%20the%20conversations%20posted%20through%20Teams%20app%20the%20displayName%20is%20being%20returned%20correctly.%20So%20I%20feel%20like%20this%20is%20a%20bug%20from%20Microsoft's%20side%20which%20needs%20to%20be%20fixed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-325372%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20REST%20API%20%3A%20Incorrect%20'User%20Name'%20being%20returned%20in%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-325372%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3BI%20also%20meet%20the%20issue.%20And%20only%20one%20user%20have%20this%20issue.%20Is%20it%20a%20bug%20or%20setting%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%20information%3C%2FP%3E%3CP%3E%40%7Bid%3D5d6786be-bfbf-4b02-8e3f-2c43ff2a093a%3B%20displayName%3Dorgid%3A5d6786be-bfbf-4b02-8e3f-2c43ff2a093a%3B%20userIdentityType%3DaadUser%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECorrect%20information%3C%2FP%3E%3CP%3E%40%7Bid%3D4deb737d-0826-4252-80b2-935c07aab418%3B%20displayName%3DAcise%20Lee%3B%20userIdentityType%3DaadUser%7D%3C%2FP%3E%3CP%3E%40%7Bid%3Dcf5a76c3-6a08-47da-9097-678a6fe5e3fc%3B%20displayName%3DPeter%20Tsai%3B%20userIdentityType%3DaadUser%7D%3C%2FP%3E%3CP%3E%40%7Bid%3Db2869b5b-a149-4805-9ce2-298fa433ba1f%3B%20displayName%3DJoseph%20Cheng%3B%20userIdentityType%3DaadUser%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi,

If we post a message through /chatThreads beta API and when we fetch the conversation with /messages beta API. 

Expected JSON was this :

"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "<user-id>",
"displayName": "John Doe",
"userIdentityType": "aadUser"
}

What I am getting is this:

"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "<user-id>",
"displayName": "orgid:<user-id>",
"userIdentityType": "aadUser"
}

 

Can someone please comment as to why this error is occurring and when can we expect this to get fixed?

 

 

 

3 Replies
Highlighted

Hi,

   I also meet the issue. And only one user have this issue. Is it a bug or setting wrong?

 

Error information

@{id=5d6786be-bfbf-4b02-8e3f-2c43ff2a093a; displayName=orgid:5d6786be-bfbf-4b02-8e3f-2c43ff2a093a; userIdentityType=aadUser}

 

Correct information

@{id=4deb737d-0826-4252-80b2-935c07aab418; displayName=Acise Lee; userIdentityType=aadUser}

@{id=cf5a76c3-6a08-47da-9097-678a6fe5e3fc; displayName=Peter Tsai; userIdentityType=aadUser}

@{id=b2869b5b-a149-4805-9ce2-298fa433ba1f; displayName=Joseph Cheng; userIdentityType=aadUser}

Highlighted

The issue is specific only to the user who posts the conversation through /chatThreads beta API.

For the conversations posted through Teams app the displayName is being returned correctly. So I feel like this is a bug from Microsoft's side which needs to be fixed.

Highlighted

Nilay,

Yes, when use chatthread API and specific user displayname show the wrong information. Others are fine, I think it should be a bug and need to be fixed....

 

Fann

Related Conversations
Microsoft Teams delay in set up
Uy1234 in Microsoft Teams on
0 Replies
Teams 1.3.00.4461 version
Mike Kruzel in Microsoft Teams on
5 Replies
Teams Set Up Delay
Uy1234 in Deployment on
0 Replies
Office 365 users in teams meeting show as guest
henhen59 in Microsoft Teams on
2 Replies
Using comments in office documents in teams
eddyyeah in Microsoft Teams on
2 Replies
Error trying to add contact to a contact group
fabiomachado in Microsoft Teams on
1 Replies