A cloud-based identity and access management service for securing user authentication and resource access
OBO Auth Issue - AADSTS500133: Assertion is not within its valid time range
Not sure What else is missing or needs to be done! Any Help would be appreciated
Error:
AADSTS500133: Assertion is not within its valid time range. Ensure that the access token is not expired before using it for user assertion, or request a new token.
I have two Apps registered for my Azure WebApp that call Foundry agents using Python SDK and Streamlit UI which in turn connects to Fabric Data Agent. Had to go via this OBO route due to the following reason: https://community.fabric.microsoft.com/t5/Fabric-platform/Fabric-Data-Agent-inaccessible-from-Azure-WebApp-using-Foundry/m-p/4915477#M24463
Registered Apps:
- Auth App registration for Authentication code (for use by either MSAL or Easy Auth (Settings > Authentication > Add identity provider in the Web App resource)
- SDK App registration for the application (for use by body of code that is using the Azure SDK for Python). This is a SEPARATE app registration from the one used for authentication.
Auth App permissions: (SDK app has been provided user_impersonation delegate permission with Admin Consent among the API permissions in the Auth app.)
SDK App permissions:
When I tried debugging my code, I could see the following: Token Type (typ): JWT Algorithm (alg): RS256 Audience (aud): api://<SDK_appID> Issuer (iss): https://sts.windows.net/<tenant_id>/ App ID (appid): <Auth_appID> Token Version (ver): 1.0 Scopes (scp): user_impersonation It was able to give "Token audience matches: api://<SDK_appID>"
Referred the following: https://stackoverflow.com/questions/78525641/attempting-to-use-the-azure-web-app-identity-provider-feature-with-a-web-app-t