diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx index 27577c0c6e1..173d20dd421 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx @@ -101,6 +101,19 @@ const Users = ({ userData, queryFilters, updateUserDetails }: Props) => { setPreviewAsset(asset); }, []); + const handleTabRedirection = useCallback(() => { + if (!isLoggedInUser && activeTab === UserPageTabs.ACCESS_TOKEN) { + history.push({ + pathname: getUserPath(decodedUsername, UserPageTabs.ACTIVITY), + search: location.search, + }); + } + }, [activeTab, decodedUsername, isLoggedInUser]); + + useEffect(() => { + handleTabRedirection(); + }, []); + const handlePersonaUpdate = useCallback( async (personas: EntityReference[]) => { await updateUserDetails({ ...userData, personas });