Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Auth0 Update SAML IdP user's name
function (user, context, callback) {
var ManagementClient = require('auth0@2.9.1').ManagementClient;
let saml_name = `${user.first_name} ${user.last_name}`;
console.log(saml_name); = saml_name;
var management = new ManagementClient({
token: auth0.accessToken,
domain: auth0.domain
management.users.update({id: user.user_id}, {
"name": saml_name
}, function (err, users) {
if (err) {
// Handle error.
return callback(err);
callback(null, user, context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment