Skip to content

Ulysses Neves

Microsoft Entra ID, authentication, and hybrid identity troubleshooting.

Menu
  • Início
  • Microsoft Azure
  • Microsoft AD FS
  • Microsoft 365
  • Contact
Menu

AD FS – Fixing error message ‘Your credentials did not work’ when trying to authenticate into an AAD Joined machine

Posted on 22 de March de 2023

Hi mates. Today, I will cover how to identify and fix the error message ‘Your credentials did not work’ during a sign-in against one Azure AD Joined machine on a federated Azure AD domain. 

Device join type: Azure AD Join
Azure AD trust type: Federated

Issue: Users might face error message below when trying to authenticate against one Azure AD Joined machine:

Error message:

Troubleshooting

To investigate the issue, considering the IDP is AD FS, we will check AD FS logs below:

  • AD FS/Admin
  • AD FS Tracing/Debug

After reproducing the issue, we are able to find in the AD FS Admin logs, error message below:

An error occurred during processing of a token request. The data in this event may have the identity of the caller (application) that made this request. The data includes an Activity ID that you can cross-reference to error or warning events to help diagnose the problem that caused this error.

Additional Data

Caller: Contoso\Jack
OnBehalfOf user:
ActAs user:
Target Relying Party: urn:federation:MicrosoftOnline

Checking event ID 501, we see more details about the claims generated in the request:

More information for the event entry with Instance ID 36a695bd-186e-4fc5-b87e-XXXXXXXXXXXXXX. There may be more events with the same Instance ID with more information.

Instance ID: 36a695bd-186e-4fc5-b87e-XXXXXXXXXXXXXX

Caller identity:
http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-application
Windows-AzureAD-Authentication-Provider/1.0
http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-user-agent
Windows-AzureAD-Authentication-Provider/1.0

Checking event ID 305 the error message below:

The Federation Service could not authorize token issuance for caller ‘Contoso\Jack
‘. The caller is not authorized to request a token for the relying party ‘urn:federation:MicrosoftOnline’. See event 501 with the same Instance ID for caller identity.

Additional Data
Instance ID: 36a695bd-186e-4fc5-b87e-XXXXXXXXXXXXXX
Relying party: urn:federation:MicrosoftOnline
Exception details: Microsoft.IdentityServer.Service.IssuancePipeline.CallerAuthorizationException: MSIS5007: The caller authorization failed for caller identity Contoso\Jack for relying party trust urn:federation:MicrosoftOnline.
at Microsoft.IdentityModel.Threading.AsyncResult.End(IAsyncResult result) at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.ProcessCoreAsyncResult.End(IAsyncResult ar) at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.EndProcessCore(IAsyncResult ar, String requestAction, String responseAction, String trustNamespace)
User Action: Use the AD FS Management snap-in to ensure that the caller is authorized to request a token for the relying party.

Based on the error above, possibly the access was denied by an authorization rule configured on AD FS to RPT MicrosoftOnline.

Checking the event ID 54 in the AD FS debug logs, we see more detailed information about the same request:

Following request context headers present:

X-MS-Client-Application: Windows-AzureAD-Authentication-Provider/1.0
X-MS-Client-User-Agent: –
client-request-id: e42254a5-e6c9-494e-0600-XXXXXXXXXXXX
X-MS-Endpoint-Absolute-Path: /adfs/services/trust/13/usernamemixed
X-MS-Forwarded-Client-IP: XX.XXX.XXX.XXX
X-MS-Proxy: WS-WAP
X-MS-ADFS-Proxy-Client-IP: XX.XXX.XXX.XXX

» Checking event ID 111, we find the Access Control Policy rules applied to the request:

Began processing Rule:
=> issue(Type = “http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod”, Value = “http://schemas.microsoft.com/claims/multipleauthn“);

Event ID 128 give us result below:

ClaimType http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod Value http://schemas.microsoft.com/claims/multipleauthn ValueType http://www.w3.org/2001/XMLSchema#string Issuer LOCAL AUTHORITY OriginalIssuer LOCAL AUTHORITY

As we can see, the result of the request above is MFA prompt.

Checking the Access Control Policy configured on AD FS for Relying party: urn:federation:MicrosoftOnline, we see the rule ‘Permit everyone and require MFA’:

Conclusion: Considering that Windows sign-on is a non-interactive request, once the user receives the MFA prompt, won’t be able to receive it and the authentication will fail.

Fix: In order to work around this behavior, we can update the policy to bypass MFA for Windows Sign-in scenarios. To accomplish this, open AD FS console and create a new ACP with rules below:

Rule 1: Request MFA for all auth requests, except for Windows Sign-on:

Rule 2: Authorize the authentication IF the agent belongs to Windows 10 Sign-on AND WS-Trust is used to avoid browser’s faking’ user agents to bypass MFA.

In the end, the ACP should look like below:

Applying the new policy to Relying party: urn:federation:MicrosoftOnline

With the policy created, it’s time to apply it to the Microsoft Online RPT in the AD FS console » Relying Party Trusts » Right-click on the RPT ‘Microsoft Office 365 Identity Platform Worldwide’ and select ‘Edit Access Control Policy’.

Once you select the new policy, you might see it updated as below:

Testing the solution

With the new rules in place, now, the user is able to sign in to the Azure AD Joined machine.

With the successful access, let’s check the difference in the processing rules:

Checking the event ID 111 AD FS Debug logs, we see the new rules applying:

Began processing Rule 1: The first rule exempts the MFA if the user agent is Windows-AzureAD-Authentication-Provider/1.0 and endpoint used is /adfs/services/trust.
NOT exists([Type == “http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-user-agent”, Value == “Windows-AzureAD-Authentication-Provider/1.0“])
&& NOT exists([Type == “http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path“, Value =~ “(?i)(/adfs/services/trust)”])
=> issue(Type = “http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod”, Value = “http://schemas.microsoft.com/claims/multipleauthn“);

Began processing Rule 2: Second rule authorizes the access with same conditions above.
exists([Type == “http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-client-user-agent”, Value == “Windows-AzureAD-Authentication-Provider/1.0“])
&& exists([Type == “http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path”, Value =~ “(?i)(/adfs/services/trust)”])
=> issue(Type = “http://schemas.microsoft.com/authorization/claims/permit”, Value = “true”);

Checking event ID 128, we are able to see the result as Permit = ‘true’:

ClaimType http://schemas.microsoft.com/authorization/claims/permit Value true ValueType http://www.w3.org/2001/XMLSchema#string Issuer LOCAL AUTHORITY OriginalIssuer LOCAL AUTHORITY

Summary

In this article, we covered how to identify and fix the error message ‘Your credentials did not work’ during a sign-in against one Azure AD Joined machine on a federated Azure AD domain.

I hope you have enjoyed reading this article, and it helps you manage your AD FS environment.

Enjoyed the article? Like and share. 🙂

Note: I do not represent the organization I work for, all the opinions expressed here, are my own. This post is provided AS IS with no warranties or guarantees and confers no rights.

In case you have any suggestions or feedback, please leave a comment.

[ ]’s
Ulysses Neves

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Microsoft Authenticator Will Block Jailbroken Devices in 2026 — What You Need to Know 17 de March de 2026
  • Enhancing Azure role activation security with FIDO2/Passkeys 23 de September de 2024
  • Microsoft Entra ID CAP | Enforcing WHfB using Authentication Strength 21 de April de 2024
  • Troubleshooting Error Code ‘0x000005e’ in WHfB: PIN Authentication Woes 11 de February de 2024
  • WHfB: Fixing Windows Hello for Business error ‘LogoncertTemplateReady: NO (StateNoTemplate)’ 29 de December de 2023

Archives

  • March 2026
  • September 2024
  • April 2024
  • February 2024
  • December 2023
  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019

Tags

#aaddownleveldevice #aadhybridjoin #adfs #adfsonsql #azuread #azureauth #azureCA #azuredevice #azurehybridjoin #azuremfa #azuresecurity #capolicy #cloudkerberostrust #conditionalaccess #conditionalaccesspolicy #deviceregistration #gmsaaccount #gopasswordless #hybridaadjoin #mfaserver #msadfs #msazure #msidentity #namedlocation #sslcertificatevalidation #tshootadfs #tshoothybridjoin #tshootwaptrust #waptrust #WHFBcerttrust #whfbdeployment #WHfBhybridsetup #widdatabase adconnect authenticationcontext authenticationstrength az500 azuread azuremfa azurepim azuresecurity cloudsecurity microsoft365 msazure WHfB
©2026 Ulysses Neves | Design: Newspaperly WordPress Theme
Ulysses Neves
Gerenciar Consentimento de Cookies
Para fornecer as melhores experiências, usamos tecnologias como cookies para armazenar e/ou acessar informações do dispositivo. O consentimento para essas tecnologias nos permitirá processar dados como comportamento de navegação ou IDs exclusivos neste site. Não consentir ou retirar o consentimento pode afetar negativamente certos recursos e funções.
Funcional Always active
O armazenamento ou acesso técnico é estritamente necessário para a finalidade legítima de permitir a utilização de um serviço específico explicitamente solicitado pelo assinante ou utilizador, ou com a finalidade exclusiva de efetuar a transmissão de uma comunicação através de uma rede de comunicações eletrónicas.
Preferências
O armazenamento ou acesso técnico é necessário para o propósito legítimo de armazenar preferências que não são solicitadas pelo assinante ou usuário.
Estatísticas
O armazenamento ou acesso técnico que é usado exclusivamente para fins estatísticos. O armazenamento técnico ou acesso que é usado exclusivamente para fins estatísticos anônimos. Sem uma intimação, conformidade voluntária por parte de seu provedor de serviços de Internet ou registros adicionais de terceiros, as informações armazenadas ou recuperadas apenas para esse fim geralmente não podem ser usadas para identificá-lo.
Marketing
O armazenamento ou acesso técnico é necessário para criar perfis de usuário para enviar publicidade ou para rastrear o usuário em um site ou em vários sites para fins de marketing semelhantes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Ver preferências
  • {title}
  • {title}
  • {title}