"No user id found for O365 JWT" error while connecting to Yammer

Occasional Visitor

Hi all,


I'm trying to access Yammer API (https://docs.microsoft.com/en-us/rest/api/yammer/userscurrentjson) via my organisation's federation setup.  But I'm getting 'No user id found for O365 JWT ' error

My flow is as follows: 

  1. I first call https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize
  2. Once user logs in, I make a call to https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/tokento get the access_token from Microsoft.
  3. I'm successfully getting the access_token and can see the optional claims that have been added in app registration in the token payload. But even after adding all these claims,  I get the 'No user id found for O365 JWT 'error. Am I missing some claims in my access_token configuration? Or is there something else that's going wrong. Any help or clue will be much appreciated.. Thanks in advance!!
  4. Below is a sample token payload (I've posted some dummy values in the fields. My main intention here is to show what all fields are returned in the token) :

"aud": "00000003-0000-0000-c000-000000000000",
"iss": "https://sts.windows.net/eec3a4e7-a3c6-4a29-bdd3-0f90f463c2e7/",
"iat": 1658931021,
"nbf": 1658931021,
"exp": 1658936564,
"acct": 0,
"acr": "1",
"aio": "AVQAq/8TAAAAshDWFIXWg9w2fXz/PYrtTf/U8rWuW7u7gw1JOpHNv69byjzRFSwNfVh0aYElAdgtTxr7t88vjLI+XcV5fEjzlpm8iZJrEExlTsN1OkkX8RZgg=bbj",
"amr": [
"app_displayname": {name},
"appid": "bff2eb32-9ffe-4bba-bd2d-75146eaa798dhjhj",
"appidacr": "1",
"family_name": "Pande",
"given_name": "Ashwini",
"idtyp": "user",
"ipaddr": "",
"name": "Pande, Ashwini",
"oid": "511e3a6f-55b2-4943-8cb8-e53454815558",
"onprem_sid": "S-1-5-21-2927747569-26780890831-1492531365-9866",
"platf": "5",
"puid": "10032001DC863yu7",
"scp": "Group.ReadWrite.All Tasks.ReadWrite User.Read User.ReadBasic.All profile openid email",
"sub": "33cG-ZnSz6CUTrLfpxgQo78Js9-YT6xfplG2UE_yWWE",
"tenant_region_scope": "EU",
"tid": "eec3a4e7-a3c6-4a29-bdd3-0f90f463cyiu6",
"unique_name": {name},
"upn": {email address},
"uti": "9ZBNkwmp3kGvXP_E5nwEQQ",
"ver": "1.0",
"wids": [
"xms_st": {
"sub": "G0QC2xkpVpL7Ppid690YAmwHN2o7hgBp2Ph6T8cYT76"
"xms_tcdt": 1429256487

1 Reply
I am having the same problem! It looks like the token doesn't have necessary user information! However the article in MS below doesn't mention anything about this!


and this article leads to this post which is exactly what I have done to access Yammer api: