Forum Discussion

Eric_Logsdon's avatar
Eric_Logsdon
Copper Contributor
May 21, 2025
Solved

Shutdown notification webhook unable to access token

I am trying to implement the AVD-Shutdown notification webhook from fortytwoservices on GitHub (https://github.com/fortytwoservices/AVD-Shutdown). It is getting an error getting the access token. The invocation log is:

I am assuming it is referring to accessing the Exchange Online mailbox that I am sending the mail through. The webhook is using MS Graph API to send the e-mail. I have set up a system assigned managed identity in the portal for the function app. Using the values in Entra for the application, I set it up in exchange as follows:

Any wisdom would be appreciated.

Eric

  • Please check on below:

     

    1. Verify AP permissions especially Mail.Send and User.Read
    2. Managed Identity configuration to see whether appropriate role assigned
    3. Token Retrieval Method, verify by using manually retrieving an access token az account get-access-token or a direct Graph API request

3 Replies

  • Please check on below:

     

    1. Verify AP permissions especially Mail.Send and User.Read
    2. Managed Identity configuration to see whether appropriate role assigned
    3. Token Retrieval Method, verify by using manually retrieving an access token az account get-access-token or a direct Graph API request
    • Eric_Logsdon's avatar
      Eric_Logsdon
      Copper Contributor

      I'm getting what appears to be a permissions error on sending the e-mail through Exchange Online. I need to double-check the permissions on the function app there.

      Thanks for your help.

    • Eric_Logsdon's avatar
      Eric_Logsdon
      Copper Contributor

      Thanks for the info. I am making progress. I'll post how it turns out.

Resources