# OPC UA Connection Faulted " no anonymous token policy found "

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300>\
**Category:** Ignition\
**Created:** [February 1, 2023, 6:35pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300 "2023-02-01T18:35:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [February 1, 2023, 6:35pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/1 "2023-02-01T18:35:18Z")

</div>

I have an issue with OPC UA connection Faulted " no anonymous token policy found "

java.lang.Exception: no anonymous token policy found  
at org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider.lambda$getIdentityToken$2(AnonymousProvider.java:47)  
at java.base/java.util.Optional.orElseThrow(Unknown Source)  
at org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider.getIdentityToken(AnonymousProvider.java:47)  
at org.eclipse.milo.opcua.sdk.client.session.SessionFsmFactory.activateSession(SessionFsmFactory.java:925)  
at org.eclipse.milo.opcua.sdk.client.session.SessionFsmFactory.lambda$configureActivatingState$19(SessionFsmFactory.java:353)  
at com.digitalpetri.strictmachine.dsl.ActionBuilder$PredicatedTransitionAction.execute(ActionBuilder.java:119)  
at com.digitalpetri.strictmachine.StrictMachine$PollAndEvaluate.lambda$run$0(StrictMachine.java:242)  
at java.base/java.util.ArrayList.forEach(Unknown Source)  
at com.digitalpetri.strictmachine.StrictMachine$PollAndEvaluate.run(StrictMachine.java:227)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.base/java.lang.Thread.run(Unknown Source)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 1, 2023, 7:42pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/2 "2023-02-01T19:42:02Z")

</div>

This means you didn’t configure a username and password for the connection and the server doesn’t allow anonymous users.

---

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [February 2, 2023, 1:18pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/4 "2023-02-02T13:18:52Z")

</div>

Thank you Kevin,  
Do I need to configure a username and password in Machine side or ignition side?  
if I should configure it in ignition side how can I do it?  
I already setup few machines by using OPC UA and never had this error.

Thanks

---

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [February 2, 2023, 3:49pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/5 "2023-02-02T15:49:26Z")

</div>

Also, sometimes I get this Fault too:  
"status=Bad\_CertificateUriInvalid, description=The URI specified in the ApplicationDescription does not match the URI in the Certificate."

 ![Arburg message](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/db174b339a0b4c2ae4402754736e43e21acea199.png)  
 ![Arburg opcua message](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72483f705ce2b0a0bc586c8c52bb5ba8f3c324db.png)

UaException: status=Bad\_CertificateUriInvalid, message=The URI specified in the ApplicationDescription does not match the URI in the Certificate.  
at org.eclipse.milo.opcua.stack.core.util.validation.CertificateValidationUtil.checkApplicationUri(CertificateValidationUtil.java:678)  
at org.eclipse.milo.opcua.stack.client.security.DefaultClientCertificateValidator.validateCertificateChain(DefaultClientCertificateValidator.java:100)  
at org.eclipse.milo.opcua.sdk.client.api.identity.UsernameProvider.getIdentityToken(UsernameProvider.java:162)  
at org.eclipse.milo.opcua.sdk.client.session.SessionFsmFactory.activateSession(SessionFsmFactory.java:925)  
at org.eclipse.milo.opcua.sdk.client.session.SessionFsmFactory.lambda$configureActivatingState$19(SessionFsmFactory.java:353)  
at com.digitalpetri.strictmachine.dsl.ActionBuilder$PredicatedTransitionAction.execute(ActionBuilder.java:119)  
at com.digitalpetri.strictmachine.StrictMachine$PollAndEvaluate.lambda$run$0(StrictMachine.java:242)  
at java.base/java.util.ArrayList.forEach(Unknown Source)  
at com.digitalpetri.strictmachine.StrictMachine$PollAndEvaluate.run(StrictMachine.java:227)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.base/java.lang.Thread.run(Unknown Source)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 2, 2023, 4:27pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/6 "2023-02-02T16:27:11Z")

</div>

This one means the server is misconfigured. There is a URI that identifies the server, and it's supposed to be present in both the certificate itself, and in the endpoints returned by the server during the GetEndpoints discovery service call.

If these URIs don't match the client should not connect, which is what you're seeing here.

What server are you trying to connect to?

---

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [February 6, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/7 "2023-02-06T15:26:41Z")

</div>

Kevin,  
How is it possible that I can connect to the machine with UA-Expert and see all tags, But ignition keep giving me these two errors?  
both should follow OPC UA standard protocol.

Thank you

 ![UA-Expert](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/6/567d8929f616f483add78ecdfa8541e94350db69.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 6, 2023, 3:38pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/8 "2023-02-06T15:38:45Z")

</div>

If those two URI values are really different then you probably clicked through a dialog in UaExpert saying to trust the certificate and connect anyway.

There’s an equivalent option to disable certificate validation in the advanced settings of the OPC UA connection in Ignition.

If you still can’t get connected then give support a call and they can help you figure out what’s different about the two configurations.

---

<div class="post-metadata">

**Author:** ![Amir\_Farmanbar](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amir\_Farmanbar](https://forum.inductiveautomation.com/u/Amir_Farmanbar)\
**Post date:** [February 6, 2023, 4:09pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/9 "2023-02-06T16:09:20Z")

</div>

Kevin,  
Once I disable certificate validation I was able to see the unit on ignition. Is that ok to leave this icon disable?

Thank you

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2023, 4:28pm UTC](https://forum.inductiveautomation.com/t/opc-ua-connection-faulted-no-anonymous-token-policy-found/69300/10 "2023-02-06T16:28:19Z")

</div>

> [@Amir\_Farmanbar](#):
>
> Is that ok to leave this icon disable?

It isn't OK. But some OPC servers are broken, giving you no choice.
