cancel
Showing results for 
Search instead for 
Did you mean: 

User Login History

Valued Contributor
Valued Contributor

Hello all!

 

I'm looking for a way to view a specific users or any/all users teamcenter login history.  Is there a way to do such things?  I've been experimenting in report builder and query builder with no luck.  Is there perhaps a log on the server which will keep track of this?

 

any input is appreciated!

 

Thanks in advance!

Jake
9 REPLIES

Re: User Login History

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Are you familiar with PLMXML, specifically, configuring a Property Set?

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: User Login History

Valued Contributor
Valued Contributor
I have configured property sets in the past in order to export item attribute lists.
Jake

Re: User Login History

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

You can try creating this PLMXML PropertySet.

PropertySet.jpg

 

 

 

 

 

 

 

 

Then use an XSL stylesheet to format the data for HTML or Excel (or both).

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema"
           xmlns="urn:schemas-microsoft-com:office:spreadsheet"
           xmlns:o="urn:schemas-microsoft-com:office:office"
           xmlns:x="urn:schemas-microsoft-com:office:excel"
           xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
           xmlns:html="http://www.w3.org/TR/REC-html40" >
<xsl:output method="xml" version="1.0" indent="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    		 xmlns:o="urn:schemas-microsoft-com:office:office"
    		 xmlns:x="urn:schemas-microsoft-com:office:excel"
    		 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    		 xmlns:html="http://www.w3.org/TR/REC-html40">    	 
			<Styles>
				<Style ss:ID="Subject">
					<Interior ss:Color="#0099ff" ss:Pattern="Solid"/>
					<Font ss:Size="12" ss:Bold="1" />
				</Style>    	     
				<Style ss:ID="header1">
					<Interior ss:Color="#0099ff" ss:Pattern="Solid"/>
					<Font ss:Bold="1" />
				</Style>
				<Style ss:ID="header2">
					<Interior ss:Color="#A0A0A0" ss:Pattern="Solid"/>
					<Font ss:Bold="1" />
				</Style>
				<Style ss:ID="header3">
					<Interior ss:Color="#FFFF99" ss:Pattern="Solid"/>
					<Font ss:Bold="1" />
				</Style>
				<Style ss:ID="s23">
					<Interior ss:Color="#ffffff" ss:Pattern="Solid"/>
				</Style>
				<Style ss:ID="s24">
					<Interior ss:Color="#ffffff" ss:Pattern="Solid"/>
				</Style>
				<Style ss:ID="s63">
					<NumberFormat ss:Format="yyyy\-mm\-dd;@"/>
					<Interior ss:Color="#ffffff" ss:Pattern="Solid"/>
				</Style>				
			</Styles>
<Worksheet ss:Name="UserList">
				<Table>
					<Column ss:AutoFitWidth="0" ss:Width="60" AutoFitWidth="1"/>
					<Column ss:AutoFitWidth="0" ss:Width="150" AutoFitWidth="1"/>
					<Column ss:AutoFitWidth="0" ss:Width="150" AutoFitWidth="1"/>
					<Column ss:AutoFitWidth="0" ss:Width="80" AutoFitWidth="1"/>
					<Column ss:AutoFitWidth="0" ss:Width="70" AutoFitWidth="1"/>	
					<Column ss:AutoFitWidth="0" ss:Width="60" AutoFitWidth="1"/>
					<Column ss:AutoFitWidth="0" ss:Width="70" AutoFitWidth="1"/>
					<Column ss:AutoFitWidth="0" ss:Width="55" AutoFitWidth="1"/>
					<Row>
						<Cell ss:StyleID="header1">
							<Data ss:Type="String">User Id</Data>
						</Cell>
						<Cell ss:StyleID="header1">
							<Data ss:Type="String">Person</Data>
						</Cell>
						<Cell ss:StyleID="header1">
							<Data ss:Type="String">email</Data>
						</Cell>
						<Cell ss:StyleID="header1">
							<Data ss:Type="String">Organization</Data>
						</Cell>
						<Cell ss:StyleID="header1">
							<Data ss:Type="String">City</Data>
						</Cell>
						<Cell ss:StyleID="header1">
							<Data ss:Type="String">License</Data>
						</Cell>
						<Cell ss:StyleID="header3">
							<Data ss:Type="String">Inactive User</Data>
						</Cell>
						<Cell ss:StyleID="header3">
							<Data ss:Type="String">Last Login</Data>
						</Cell>
					</Row>
<xsl:call-template name="user"/>
</Table>	 
				<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
					<Selected/>
					<ProtectObjects>False</ProtectObjects>
					<ProtectScenarios>False</ProtectScenarios>
				</WorksheetOptions> 
			</Worksheet>
		</Workbook>		
</xsl:template>
	<xsl:template name="user" >
		<xsl:for-each select="//plm:User">
			<xsl:variable name="personref" select="substring-after(./@personRef, '#')" />
			<xsl:variable name="person" select="//plm:Person[@id=$personref]" />
			<Row>
				<Cell ss:StyleID="s24">
					<Data ss:Type="String">
						<xsl:value-of select="plm:UserData/plm:UserValue[@title='user_id']/@value" />
					</Data>
				</Cell>
				<Cell ss:StyleID="s24">
					<Data ss:Type="String">
						<xsl:value-of select="plm:UserData/plm:UserValue[@title='user_name']/@value" />
					</Data>
				</Cell>
				<Cell ss:StyleID="s24">
					<Data ss:Type="String">
						<xsl:value-of select="$person/plm:UserData/plm:UserValue[@title='PA9']/@value" />
					</Data>
				</Cell>
				<Cell ss:StyleID="s24">
					<Data ss:Type="String">
						<xsl:value-of select="$person/plm:UserData/plm:UserValue[@title='PA6']/@value" />
					</Data>
				</Cell>
				<Cell ss:StyleID="s24">
					<Data ss:Type="String">
						<xsl:value-of select="$person/plm:UserData/plm:UserValue[@title='PA2']/@value" />
					</Data>
				</Cell>
				<Cell ss:StyleID="s24">
					<xsl:choose>
						<xsl:when test="(plm:UserData/plm:UserValue[@title='license_level']/@value = 1)">
							<Data ss:Type="String">consumer</Data>
						</xsl:when>
						<xsl:when test="(plm:UserData/plm:UserValue[@title='license_level']/@value = 0)">
							<Data ss:Type="String">author</Data>
						</xsl:when>
						<xsl:when test="(plm:UserData/plm:UserValue[@title='license_level']/@value = 5)">
							<Data ss:Type="String">admin</Data>
						</xsl:when>
						<xsl:otherwise>
							<Data ss:Type="String">other</Data>
						</xsl:otherwise>
					</xsl:choose>												
				</Cell>
				<Cell ss:StyleID="s23">
					<Data ss:Type="Number">
						<xsl:value-of select="plm:UserData/plm:UserValue[@title='status']/@value" />
					</Data>
				</Cell>
				<Cell ss:StyleID="s63">
					<Data ss:Type="DateTime">
						<xsl:value-of select="plm:UserData/plm:UserValue[@title='last_login_time']/@value" />
					</Data>
				</Cell>
			</Row>		
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: User Login History

Pioneer
Pioneer

You can have your DBA query the infodba.ppom_user table which has the last login date of the user. This could be a quick and simple solution if its needed only for administrative purposes.

Re: User Login History

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Good point @LN, I didn't ask if they've already run the standard reports...
Tools > Reports > Report Builder Reports
Select License Usage Report - A summary of each named user's usage per month.
Select Module Usage Report - A summary of usage of optional module licenses.

These reports replace the deprecated LicenseUsageAuditTool in pre-Tc10.1.5. You had to save off your FlexNet logs to be mined by this Util.

You can modify the stylesheets for the new reports:
license_usage_status_text.xsl
module_license_usage_status_text.xsl

Set pref LicenseUsage_show_userId_in_report to true (default) to display the actual user Id.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: User Login History

Valued Contributor
Valued Contributor

Thanks @LN and @RandyEllsworth

 

I am DBA, I am trying to see every time a certain user has logged in since the beginning of the year.  I am thinking a property set would possibly be the best option in this scenario, I am going to try what @RandyEllsworth mentioned in his previous post!  I will update the thread afterwards!

 

Thanks!

Jake

Re: User Login History

Valued Contributor
Valued Contributor

It appears the only login history Teamcenter records, is a users last login time.  Which tells me this might not be possible.  We would like to see a complete history of a user login activity.  Has anyone been successful at collecting this data before?  Perhaps with 3rd party solutions or maybe on the license server side of thigs?

 

Thanks,

Jake

Re: User Login History

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
We used to mine that kind of info from the license server log. The problem is the log gets overwritten when the license service is restarted so you have to archive the log before restarting. Then go through the archives to compile usage. Unless you've been archiving the license server logs then I think you're out of luck.

@ardenb posted a third party tool in another thread somewhere. Maybe he can chime in?

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: User Login History

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

I pointed someone else to https://openlm.com, but it relies on the flexlm log file, too. Neither Teamcenter or flexlm stores login information to the level you're looking for, so in the past I've written tools that can be run on a schedule and write out license usage to a database. Once it's in a database it's fairly easy to query it for reports or the usage history of an individual.

Arden Bedell | Teamcenter Wonk | Applied CAx, LLC