aad-sso-wordpress
aad-sso-wordpress copied to clipboard
How to get Azure User Data?
Love this plugin.
How does one pull in their Azure photo? We're building a front end, and I need their profile photo from Azure.
Maybe something like, $current_user->data->azure->display_photo ?
If the thumbnail photo is in Azure AD, then this is possible, but requires a slight modification. Would you be using the photo from another plugin or a theme?
Thanks for the quick reply!
We want to pull ALL user data authentication from Azure AD. So this means the profile photo set in Azure is the right one.
We can even pull that back and store locally on the WP side if need be, we just need to access it some how.
Ok, and if this is made available (for example, in a variable), how would you consume it? Via a plugin or a theme?
Ahh I see.
Can’t this be made from your existing Azure plugin?
We would be access via theme at the moment.
Can it assign to current_user ?
From: Philippe Signoret [mailto:[email protected]] Sent: May 5, 2017 12:54 PM To: psignoret/aad-sso-wordpress [email protected] Cc: Andrew Normore [email protected]; Author [email protected] Subject: Re: [psignoret/aad-sso-wordpress] How to get Azure User Data? (#134)
Ok, and if this is made available (for example, in a variable), how would you consume it? Via a plugin or a theme?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/psignoret/aad-sso-wordpress/issues/134#issuecomment-299517838, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aa2dYVpuO9bkPz4EL-EMmYAyI_96MkHBks5r21QWgaJpZM4NSGrA.
Yes, this plugin can retrieve the data. My question is: then what? What would you do with it once it's as retrieved and made available in some way?
Once the data is retrieved, can we add it to the user_meta table for storage?
I can then do $wpdb find azure_pic, if result 0, $azure->get_profile_pic from your plugin method – for example.
This allows me to display a users profile pic, from Azure.
I would probably do this action on LOGIN and REGISTER, so that if a user changes their profile pic, it will sync at next login.
From: Philippe Signoret [mailto:[email protected]] Sent: May 5, 2017 1:41 PM To: psignoret/aad-sso-wordpress [email protected] Cc: Andrew Normore [email protected]; Author [email protected] Subject: Re: [psignoret/aad-sso-wordpress] How to get Azure User Data? (#134)
Yes, this plugin can retrieve the data. My question is: then what? What would you do with it once it's as retrieved and made available in some way?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/psignoret/aad-sso-wordpress/issues/134#issuecomment-299529169, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aa2dYYaEfIDruHYKuA5yDV28h5HHqtzUks5r219AgaJpZM4NSGrA.
At a maximum, I think we should make this available available by a hook/filter via a companion plugin but syncing anything beyond role mapping seems like a rare use case.
This would be awesome for a project I am currently looking at. Instead having each author on the site registering with Gravatar and having WordPress display a Gravatar image for the author, we could pull the profile image for the user from Azure AD.
The users of my project will not be the most tech savvy, so making it as seamless and easy for them to get it right would be ideal. In essence, I would be looking to consume it within the theme and the author box specifically.
We also would love this feature
I'd like to be able to use Wordpress as an Intranet site for our company. We use Office 365, so it would be great if our users can authenticated using this plugin, and then have their common information downloaded / mapped to some custom wordpress fields, such as Department, Title (jobTitle in MS graph), Phone, and email address. Then it should be fairly easy to create an employee directory that can be filtered by department / title, etc.
@psignoret Can we get added on Skype, and I'll help develop this feature? Seems to be quite heavily needed by the community on such a great plugin. You point the way, I'll do the lifting?
If not, know that I'm still working on it... will commit back when I get it working.
Just going to dump it in user_meta on a login hook.
@anormore Can you share the details of the approach you're taking? I've almost finished this already, so we should avoid double work here.
Hello @psignoret and @anormore ... has any progress been made here?
+1
+1