Skip to content

Instantly share code, notes, and snippets.

@zeaphoo
Created November 20, 2019 02:29
Show Gist options
  • Select an option

  • Save zeaphoo/e7cab7fae44bf1498329670686d1e172 to your computer and use it in GitHub Desktop.

Select an option

Save zeaphoo/e7cab7fae44bf1498329670686d1e172 to your computer and use it in GitHub Desktop.
Batch add users in enterprise application in azure active directory
var names = ["user@example.com"]
function add_user(email) {
//replace id with your element id, it changes every time opened.
var element = document.getElementById("azc-form-guid-b7296a20-57fa-4592-bc1c-f15001a5c063-for");
var ev = new Event('input', { bubbles: true});
ev.simulated = true;
element.value = email;
element.dispatchEvent(ev);
var item = $('.fxs-portal-hover.fxs-portal-focus.azc-grid-row')[0]
item.click()
}
names.forEach(function(email, index){
setTimeout(function(){
add_user(email)
}, 3000*index)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment