Skip to content

OnPremiseClient Security Context Token Expiration #51

@engo63

Description

@engo63

I'm using the OnPremiseClient object to create connections in a long running console app that does additions and updates between 2 CRM instances. Creating the connections is fine and has no issues. The problem I'm experiencing is that the security context token is expiring and there doesn't appear to be anyway to monitor this and renew the token after the expiration.

The app we have is running continuously and polling for changes every 30 seconds we didn't want the overhead of creating CRM connections every time the app polls, nor did we won't to use long timeout sessions when creating the OnPremiseClient connections.

Is there a way to monitor the Token status or if not. Can it be added to the code base.

The security context token is expired or is not valid. The message was not processed. System.ServiceModel.FaultException: The security context token is expired or is not valid. The message was not processed.
   at Data8.PowerPlatform.Dataverse.Client.ADAuthClient.Execute(OrganizationRequest request)
   at Data8.PowerPlatform.Dataverse.Client.OnPremiseClient.RetrieveMultiple(QueryBase query)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions