Can't create custom Login pages for Defender Attack Simulation Training

Richard Stahl 20 Reputation points
2026-04-20T18:22:22.8633333+00:00

I'm trying to create a custom login page for an attack simulation and am running into an issue. I am clicking "Create a copy" of the Microsoft login template, and am getting the following error:

The error says: ${submitLink} token must be inside a clickable element (button/link with click handler).

Every login page I have attempted to clone has this exact error message appear. What I've done to attempt to resolve this is add the following button to my login page instead of the default button.

<button type="button" onclick="${submitLink}">Sign in</button>																		

This puts the button in correctly in the website, just with a different color (which I am okay with), but still get the same error. What I've found is happening is that the editor is automatically removing the

onclick="${submitLink}"															

portion of my button declaration.

Here is a picture of the button declaration right after I paste it into the Code box.

User's image

As soon as I click outside of the editor box, the onclick portion of the button tag is completely removed, and the validation error appears again.

User's image

Why is this happening? Is there something that I am doing wrong?

Thanks.

Microsoft Security | Microsoft Defender | Other

Answer recommended by moderator
Richard Stahl 20 Reputation points
2026-05-06T13:17:17.45+00:00

The only way I was able to get this working was by using the "Add Next button" and "Add Compromise button" while in the Text portion of the editor, and switching to the Code portion and using that to move it to where it was needed in the HTML of the page.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Newest

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.