Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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?
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.
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.
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
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