Is there a way to query if an Autodesk account has been setup on the local machine?

Is there a way to query if an Autodesk account has been setup on the local machine?

duanemizell
Explorer Explorer
951 Views
5 Replies
Message 1 of 6

Is there a way to query if an Autodesk account has been setup on the local machine?

duanemizell
Explorer
Explorer

Hello,

I'm designing a Powershell/WinForms script for employees that are new to our firm.

 

 

As you can see, I've programmed some logic to "DISABLE" certain buttons based off certain factors - like, have they already setup their Outlook profile?

 

I would like to enable this logic for my "AD" button, but I do not know a "good" way to query if the employee has already setup an Autodesk account or not. Is there any way to tell this from the local machine or any way to query this information? I assume not, but figured I would ask anyways!

Thanks!

 

Reply
Reply
Accepted solutions (1)
952 Views
5 Replies
Replies (5)
Message 2 of 6

DarrenP
Consultant
Consultant

I don’t believe so

You would have to check here: manage.autodesk.com 

For the users

DarrenP
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Reply
Reply
Message 3 of 6

duanemizell
Explorer
Explorer

Thanks for the reply. I thought I may have been getting somewhere with the LoginState.xml file, but it doesn't seem to contain my email address for some reason.

 

I've been trying to locate this info (locally) so I don't have to authenticate for any remote queries - trying to keep the script as concise as possible. 

 

My testing method is using my own email address to log in to Revit after trying to open it - my email address is unlicensed, so I am unable to proceed with opening Revit, but my email information appears to be stored somewhere because it's not prompting me anymore when I try to close and reopen Revit... Would be really nice to be able to glean this information somehow so I can enable or disable my button in my script.

 

Reply
Reply
0 Likes
Message 4 of 6

duanemizell
Explorer
Explorer

Looks like there's a "WebServicesCache.xml" file located in:

<UsersAppData>\Local\Autodesk\Web Services\AdskLicensingAgent\34fafd89-a147-4142-b8bb-0c9ab116c63e

 

The file contains pretty much all the info I'm requesting and appears consistent across logins and PC's... Is there some reason I SHOULDN'T use this file to glean the info?

 

Reply
Reply
0 Likes
Message 5 of 6

Anonymous
Not applicable

Try it & see

Reply
Reply
Message 6 of 6

duanemizell
Explorer
Explorer
Accepted solution

This function I wrote seems to work fine:

$emaildomain = "@<youremaildomain>.com"
Function Get-Autodesk-Login() {
	$ADeskConfFile = "$($env:LOCALAPPDATA)\Autodesk\Web Services\AdskLicensingAgent\34fafd89-a147-4142-b8bb-0c9ab116c63e\WebServicesCache.xml"
	$ADeskConfFile = Get-Content $ADeskConfFile
	$UsersUneditedEmail = $ADeskConfFile | Select-String -Pattern $emaildomain
	$UsersUneditedEmail = $UsersUneditedEmail -replace '[<]',''
	$UsersUneditedEmail = $UsersUneditedEmail -replace '[>]',''
	$UsersUneditedEmail = $UsersUneditedEmail -replace 'email',''
	$UsersUneditedEmail = $UsersUneditedEmail -replace '[/]',''
	$UsersEditedEmail = $UsersUneditedEmail -replace ' ',''
	If ($UsersEditedEmail -eq $null) {
		Return "$False"
	} ElseIf ($UsersEditedEmail -eq $UserEmail) {
		Return "$True"
	} Else {
		Return "$BROKEN"
	}
}

 

Reply
Reply