diff --git a/pkg/app/provider/wopi/wopi.go b/pkg/app/provider/wopi/wopi.go index e3f503f2a25..c0a4842283d 100644 --- a/pkg/app/provider/wopi/wopi.go +++ b/pkg/app/provider/wopi/wopi.go @@ -155,6 +155,11 @@ func (p *wopiProvider) GetAppURL(ctx context.Context, resource *provider.Resourc } if u.Id.Type == userpb.UserType_USER_TYPE_LIGHTWEIGHT || u.Id.Type == userpb.UserType_USER_TYPE_FEDERATED { q.Add("userid", resource.Owner.OpaqueId+"@"+resource.Owner.Idp) + if !strings.Contains(u.DisplayName, "(") { + // the display name was not decorated with `(domain)` by the auth provider, + // assume this is an OCM user and append the corresponding Idp + u.DisplayName = u.DisplayName + "@" + u.Id.Idp + } } else { q.Add("userid", u.Id.OpaqueId+"@"+u.Id.Idp) }