Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Azure Function V2 Graph token- invalid_grant, Assertion is not within its valid time range #103

Open
rajat1021 opened this issue Mar 13, 2019 · 2 comments

Comments

@rajat1021
Copy link

rajat1021 commented Mar 13, 2019

I am working on Azure function V2 Graph token template. I am getting below error if you don't use the system for a while.
2019-03-13T10:08:10.911 [Error] Executed 'Functions.GraphTest' (Failed, Id=ad2e8baf-6af7-4ac1-86f4-50bf8e936373) {"error":"invalid_grant","error_description":"AADSTS500133: Assertion is not within its valid time range.\r\nTrace ID: 225b4107-f46c-411d-ab13-9aead85cf600\r\nCorrelation ID: 59db5657-4510-4010-a2d4-fc07309c45cd\r\nTimestamp: 2019-03-13 10:08:10Z","error_codes":[500133],"timestamp":"2019-03-13 10:08:10Z","trace_id":"225b4107-f46c-411d-ab13-9aead85cf600","correlation_id":"59db5657-4510-4010-a2d4-fc07309c45cd"}

extensions.csproj

<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.AuthTokens" Version="1.0.0-beta6" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph" Version="1.0.0-beta6" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.*" />

Please help me to solve this. As we want this to implemented in our most of the solutions

@mjarmstrong
Copy link

Also running into this issue.

@nmanzi
Copy link

nmanzi commented Jul 15, 2019

Also having this issue. Occurs with Function configured for AAD Auth and token store enabled, using the token binding.

[FunctionName("GetESSLink")] public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, [Token(Resource="https://graph.microsoft.com", Identity=TokenIdentityMode.UserFromRequest)]string graphToken, ILogger log)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants