fix: correct unmarshall of EntraID userinfo when retrieving intent information (#10507)

# Which Problems Are Solved

EntraID userinfo gets incorrectly unmarshalled again in the
`RetrieveIdentityProviderIntent` endpoint.

# How the Problems Are Solved

Correctly use the already available information and not try to marshall
it into a `RawInformation` struct again.

# Additional Changes

None

# Additional Context

Closes https://github.com/zitadel/typescript/issues/578

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Stefan Benz
2025-08-22 07:35:58 +02:00
committed by GitHub
parent 473c33754f
commit 93ea30ba2e
5 changed files with 213 additions and 12 deletions

View File

@@ -161,17 +161,17 @@ func (p *Provider) User() idp.User {
// AzureAD does not return an `email_verified` claim.
// The verification can be automatically activated on the provider ([WithEmailVerified])
type User struct {
ID string `json:"id"`
BusinessPhones []domain.PhoneNumber `json:"businessPhones"`
DisplayName string `json:"displayName"`
FirstName string `json:"givenName"`
JobTitle string `json:"jobTitle"`
Email domain.EmailAddress `json:"mail"`
MobilePhone domain.PhoneNumber `json:"mobilePhone"`
OfficeLocation string `json:"officeLocation"`
PreferredLanguage string `json:"preferredLanguage"`
LastName string `json:"surname"`
UserPrincipalName string `json:"userPrincipalName"`
ID string `json:"id,omitempty"`
BusinessPhones []domain.PhoneNumber `json:"businessPhones,omitempty"`
DisplayName string `json:"displayName,omitempty"`
FirstName string `json:"givenName,omitempty"`
JobTitle string `json:"jobTitle,omitempty"`
Email domain.EmailAddress `json:"mail,omitempty"`
MobilePhone domain.PhoneNumber `json:"mobilePhone,omitempty"`
OfficeLocation string `json:"officeLocation,omitempty"`
PreferredLanguage string `json:"preferredLanguage,omitempty"`
LastName string `json:"surname,omitempty"`
UserPrincipalName string `json:"userPrincipalName,omitempty"`
isEmailVerified bool
}