The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> ASP Programming
|
ASP / VBScript - AD Email
Discuss ASP / VBScript - AD Email in the ASP Programming forum on Dev Shed. ASP / VBScript - AD Email ASP Programming forum discussing Active Server Pages coding techniques and problem solving methods. Use VBScript or Jscript to make dynamic web applications.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 15th, 2011, 12:14 PM
|
|
Registered User
|
|
Join Date: Jul 2011
Posts: 3
Time spent in forums: 1 h 17 m 29 sec
Reputation Power: 0
|
|
|
ASP / VBScript - AD Email
Hello everyone,
I've been referencing DevShed for a while, but I've finally stepped up to the pitcher's mound (created an account) to see what kind of swings I'll get.
I'm attempting to create a page on our Intranet that will be used as an SSO portal for Bloomfire. I already have the HTML/ASP code that will request a session key from Bloomfire using the user's email address and our apikey. I then use the response from that server to append the session key to the end of a URL redirecting the user to the Bloomfire site, and they are logged in as if they entered their username and password. I have no issues with this.
I also have a Server-Side VBScript that grabs the logged on user's Windows Common Name, and searches AD for their email. This script is fully functioning by itself.
My question is how to get the two to intermingle. I want the VBS to find the user's email address and then pass it to the ASP so I can have the user click a button to send their email and our api key to Bloomfire.
Any ideas?
|

July 15th, 2011, 12:31 PM
|
|
Registered User
|
|
Join Date: Jul 2011
Posts: 3
Time spent in forums: 1 h 17 m 29 sec
Reputation Power: 0
|
|
|
More Info
Hey all,
I realized I didn't really provide much to go on. The VBScript is as follows:
Set objSysInfo = CreateObject("ADSystemInfo")
userName = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & userName)
MsgBox objUser.mail
Which I can run, or enclose as a function and call from the same file. I want to pass objUser.mail to an ASP file which creates the GUI for the page, and uses AJAX to send an XMLHttpRequest object with the email and apikey to Bloomfire, and read the session key from the response. I then simply append that key to the end of a URL (with ?session_key=xxxx) and redirect the user.
|

July 15th, 2011, 08:36 PM
|
|
|
|
Are you using classic asp (.asp files) or asp.NET (.aspx files). If asp.NET I can move this to the NET forum, this forum is mostly classic asp.
In classic asp probably the easiest way to use both scripts would be to wrap the vbs in a COM wrapper.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
|

July 19th, 2011, 09:47 AM
|
|
Registered User
|
|
Join Date: Jul 2011
Posts: 3
Time spent in forums: 1 h 17 m 29 sec
Reputation Power: 0
|
|
|
Doug,
Thanks for the response. The code is .ASP classic. I attempted scouring Google to find how to 'wrap' my .vbs code to make it work as well, but I couldn't. I ended up using a simple .vbs script to create a table with all of our users' email addresses and Windows usernames. Then I grabbed their usernames with a WScript.Network object, and compared them in the table to find the email address. The rest was already done, just a request with email and apikey to BF and pull the session key from the response, append to URL and redirect.
The Bloomfire API is pretty cool too, because if a user appears on my Excel sheet, and doesn't have an account in Bloomfire the API allows me to automatically create the account with a request object, and the response contains the new username and password along with the session key.
Thanks for the assistance, now I just have to figure out how to mark my ActiveX Control as safe for scripting... MSDN here I come!
|

July 19th, 2011, 03:32 PM
|
|
|
|
I'm glad you got it sorted. What I meant was to use some other programming language to encapsulate the vbscript functionality in a .dll that could subsequently be instantiated by your asp code.
|

February 28th, 2013, 11:46 PM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 34 m 28 sec
Reputation Power: 0
|
|
|
ASP call to Bloomfire
Hi Markhjr,
I want to get Bloomfire session key using ASP classic code, can you please share the code that request a session key from Bloomfire using the user's email address and our apikey and how did you append the session key to the end of a URL redirecting the user to the Bloomfire site?
Thanks in Advance.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|