I'm encountering issues while creating a custom connector to interact with the on-prem SMAX API for retrieving requests. The API requires a specific header: Cookie
with the value SMAX_AUTH_TOKEN=token
.
I've successfully implemented this using policies and environment variables, following the approach outlined in this thread: https://community.powerplatform.com/forums/thread/details/?threadid=4566e65f-9d05-490d-96cf-51f09f0c2436. The environment variables are updated every hour.
Using the policy-based approach works initially, but once the token expires, the connector stops functioning. The only way I've found to restore functionality is by manually updating the custom connector. It seems like the environment variables are only fetched when the connector is updated.
I've also attempted to automate the connector update through the API as outlined here: https://learn.microsoft.com/en-us/connectors/custom-connectors/solution-custom-api#update-a-connector, but unfortunately, this doesn't seem to refresh the environment variables.
Has anyone encountered a similar issue or found a solution for automatically refreshing the connector when the token expires? Any guidance would be greatly appreciated!