Return linked Tenant ID in the auth response
When a user has access to multiple Xero accounts it would be great to know the Tenant ID of the account they linked in the auth response.
-
Suryakant Patel commented
Hi Patrick
Have you got the solutions? I have same issue
I am getting below payload via API/SDK
token.Payload
Count = 18
[0]: {[nbf, 1705862822]}
[1]: {[exp, 1705863122]}
[2]: {[iss, https://identity.xero.com]}
[3]: {[aud, 5A31D059F46848C2AEF65572E2D996F5]}
[4]: {[iat, 1705862822]}
[5]: {[at_hash, 3dehh1TAnGrALkvLwPLHXQ]}
[6]: {[s_hash, J1fCVSvQdSiXKjErcLPEkA]}
[7]: {[sid, 298c2d02afc84449bd4643c5a7a55c52]}
[8]: {[sub, 9c1fdad16eb7537789893cadea2d5e23]}
[9]: {[auth_time, 1705862812]}
[10]: {[xero_userid, b2961226-defd-41a2-bcc9-5c566a04b7b3]}
[11]: {[global_session_id, 298c2d02afc84449bd4643c5a7a55c52]}
[12]: {[preferred_username, suryakant.caax@gmail.com]}
[13]: {[email, suryakant.caax@gmail.com]}
[14]: {[given_name, Suryakant]}
[15]: {[family_name, Patel]}
[16]: {[name, Suryakant Patel]}
[17]: {[amr, {[
"pwd"
]}]}but cant find Tenant ID in response
-
Patrick commented
Hi Xero,
Can the connect/token API return us the tenantId when we first time authentication handshake? Because in API perspective, there's no way to identify which tenants is being authorised when user is selecting the particular organisation in the Xero authorization page.
-
Anonymous commented
I couldn't agree more. I cannot believe this has not solved yet
-
Trevor commented
Agreed, I cannot believe it is bnot returned. Relying on the name is rubbish. This is not good prctice, its amateur.