cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

We need email of a user in a thing service but the email field in the user extension field is empty.

VR_10133499
13-Aquamarine

We need email of a user in a thing service but the email field in the user extension field is empty.

We are creating a service where we can send emails to users using a thing service. But the email field in the user extension does not have the user's email ID maintained. We have integration with azure, is it possible to get an email Id from Azure using a thing service? or is there any other way to retrieve the user's email ID?

7 REPLIES 7

I strongly suggest implementing the storage of the user email address in the user extension field.

What kind of integration you have with Azure? SSO?

If so, you should have a way to setup this type of attribute quite easily.

 

We now have a lot of users on our platform and it is a tedious task to update user extensions for all the users manually.

I am not sure if the integration with Azure is SSO enabled, but I can check that.

In case we have Azure integration SSO enabled, will it be possible for the updating of the email in the user extension to be done by some scripts or any other way except for doing it manually.

@VR_10133499 

I haven't suggested to do it manually in my email. Out of curiosity, what exactly do you mean by "integration with Azure" ? When I saw that I assumed you have either Directory Services or SSO with Azure. Can you also explain how users are created in your system?

If you have SSO, with any provider, the user's email address is usually retrieved as an attribute, via configuration, and updated when the user logs in.

I'm pretty sure that creating a script to have this update functionality is doable, but without more details around what is your specific infrastructure setup, it's hard to suggest anything.

Right now we have Directory services. But we plan to move to SSO soon.

The users are created manually by a separate admin team. I also see that the 'emailaddress' is mapped to 'UserPrincipalName' in the active directory attribute name. The 'UserPrincipalName' is not available/visible in the user extension, and I am not sure how I retrieve data from that in a service.

@VR_10133499 ,

 

If you need to retrieve the email programmatically before you have SSO implemented, you can use the Microsoft Graph APIs to retrieve user information from Azure AD

 

Nick

VR_10133499
13-Aquamarine
(To:nmilleson)

Thanks for your answer.

We have our services residing in Thingworx, Will it be possible to invoke the Microsoft Graph APIs from Thingworx?

Yes.  The easiest way will be to create an App Registration in Azure and assign it scopes for the Graph API.  Then you can use a client secret to authenticate it.  The ThingWorx services you use will be the ContentLoaderFunctions.

 

Nick

Top Tags