Logic app run issues

Chris su 1 Reputation point
2022-10-19T20:43:59.36+00:00
{  
    "statusCode": 401,  
    "headers": {  
        "Pragma": "no-cache",  
        "x-ms-failure-cause": "gateway",  
        "x-ms-request-id": "2efdb301-9cc9-4e49-a807-745ee70ff1fe",  
        "x-ms-correlation-request-id": "2efdb301-9cc9-4e49-a807-745ee70ff1fe",  
        "x-ms-routing-request-id": "EASTUS:20221019T070001Z:2efdb301-9cc9-4e49-a807-745ee70ff1fe",  
        "Strict-Transport-Security": "max-age=31536000; includeSubDomains",  
        "X-Content-Type-Options": "nosniff",  
        "Timing-Allow-Origin": "*",  
        "x-ms-apihub-cached-response": "false",  
        "x-ms-apihub-obo": "false",  
        "Cache-Control": "no-cache",  
        "Date": "Wed, 19 Oct 2022 07:00:00 GMT",  
        "WWW-Authenticate": "Bearer authorization_uri=\"https://login.windows.net/ba035316-217d-4ed2-97e1-a78d1dfff36f\", error=\"invalid_token\", error_description=\"The access token is from the wrong issuer. It must match the tenant associated with this subscription. Please use correct authority to get the token.\"",  
        "Content-Length": "702",  
        "Content-Type": "application/json",  
        "Expires": "-1"  
    },  
    "body": {  
        "error": {  
            "code": "InvalidAuthenticationTokenTenant",  
            "message": "The access token is from the wrong issuer 'https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/'. It must match the tenant 'https://sts.windows.net/ba035316-217d-4ed2-97e1-a78d1dfff36f/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/ba035316-217d-4ed2-97e1-a78d1dfff36f' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later."  
        }  
    }  
}  

when running my shutdown logic app. I have these problem.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,551 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. MayankBargali-MSFT 70,941 Reputation points Moderator
    2022-10-20T05:07:29.24+00:00

    @Chris su Thanks for reaching out. Can you share more details about how you are generating the token? In which action are you getting the error? Please share more details along with your workflow details so we can assist you further.

    As per the error it looks like the token was generated with the different tenant for which you are trying to perform the operation on the subscription that is on different tenant for which you have generated the token.


  2. Bruno Lucas 4,436 Reputation points MVP
    2022-10-23T07:09:03.99+00:00

    Hi @Chris su

    look like you obtained a token from one azure subscription and is trying to access a resource in a different azure subscription

    253249-image.png

    253179-image.png

    0 comments No comments

  3. BARRY HUANG 0 Reputation points
    2023-10-01T10:12:32.17+00:00

    I face to the same issue, basically I have one subscription only , and under this subsription , I create a VM, and use VM auto-shutdown function to automatically shutdown it, but I will see the same error, not sure where is the wrong token come from .

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.