web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

HTTP connector for assignLicense to Group failing with 404

(0) ShareShare
ReportReport
Posted on by 14
Hello,
 
I have a head scratcher here. I have a flow that is calling the Graph API to add/remove skuId's to a group via the HTTP connector.
 
The syntax of the json payload, method (POST), headers, and URI work in graph explorer without issue.
 
Below is a sanitized raw input from the flow.
 
{
    "uri""https://graph.microsoft.com/v1.0/Groups/{GROUPID}/assignLicense",
    "method""POST",
    "headers": {
        "Content-type""application/json"
    },
    "authentication": {
        "authority""https://login.microsoftonline.com",
        "tenant""HIDDEN",
        "audience""https://graph.microsoft.com",
        "clientId""HIDDEN",
        "secret""*sanitized*",
        "type""ActiveDirectoryOAuth"
    },
    "body": {
        "addLicenses": [
            {
                "skuId""314c4481-f395-4525-be8b-2ec4bb1e9d91"
            }
        ],
        "removeLicenses": []
    }
}
 
 
The output:
 
{
    "statusCode"404,
    "headers": {
        "Date""Wed, 01 Oct 2025 05:45:21 GMT",
        "Cache-Control""no-store, no-cache",
        "Transfer-Encoding""chunked",
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "x-ms-islandgateway""_prdil102ecagb0_3",
        "x-ms-igw-tracking-id""f41a655d-183e-4c8b-8ee7-dc15e3aae1bc20251001054521_prdil102ecagb0_3",
        "mise-correlation-id""cdcf3999-0e10-4a04-91ae-6bae316e6ad1",
        "Request-Id""3f992dc8-d764-4a30-b188-11194e4e4d33",
        "client-request-id""3f992dc8-d764-4a30-b188-11194e4e4d33",
        "x-ms-ags-diagnostic""{\"ServerInfo\":{\"DataCenter\":\"Canada East\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"QB1PEPF000057A1\"}}",
        "Server-Timing""x-ms-igw-upstream-headers;dur=14.9,x-ms-igw-req-overhead;dur=0.5",
        "X-Content-Type-Options""nosniff",
        "x-ms-service-request-id""f41a655d-183e-4c8b-8ee7-dc15e3aae1bc",
        "x-ms-correlation-id""0f07ba81-5dcc-4eec-b2b9-5f89821ba572",
        "x-ms-activity-vector""00.01.IN.8N.IN.10.00",
        "Content-Type""application/json",
        "Content-Length""224"
    },
    "body": {
        "error": {
            "code""ResourceNotFound",
            "message""Invalid version: v2",
            "innerError": {
                "date""2025-10-01T05:45:21",
                "request-id""3f992dc8-d764-4a30-b188-11194e4e4d33",
                "client-request-id""3f992dc8-d764-4a30-b188-11194e4e4d33"
            }
        }
    }
}
 
 
The thing is the licenses get assigned as expected but the return values are stating a failure "ResourceNotFound Invalid Version: v2".  So, it is technically working but the return code is thinking it failed.  I was forced to branch this function with a delay so it always happens last and not prematurely exit the flow.
 
Anybody come across this and have a fix?
 
Thanks,
Cory
I have the same question (0)
  • Suggested answer
    Cory Teale Profile Picture
    14 on at
    HTTP connector for assignLicense to Group failing with 404
     
    I am not really setup for Postman and TBH I am a n00b with Postman.  I tried the beta endpoint which also gave the exact same results.  I have done extensive testing is MS Graph Explorer with this and get no errors.  After reading a bunch of posts online around HTTP connector and 404, I am thinking this may be an expected result as there may not be anything to return when updating the assignLicence endpoint.  Since I am now expecting the result (404), I have placed an action that will run on success or fail after this HTTP connector so that the entire flow run shows as successful.  This was the basic desired outcome I was looking for.  Not perfect but it works!
     
    I appreciate all your help on this topic.
     
    Cory    
  • Expiscornovus Profile Picture
    32,521 Most Valuable Professional on at
    HTTP connector for assignLicense to Group failing with 404
     
    Have you tried to reuse the same app registration (client id & secret) in a test in Postman.
     
    Just to double check if you are getting the same result and if it is somehow related to the app registration and/or the permissions of that app.
     
    And have you tried switching from v1.0 to beta endpoints (just for testing purposes). Does that make a difference?

     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
     
     
  • Cory Teale Profile Picture
    14 on at
    HTTP connector for assignLicense to Group failing with 404
     
    I tried removing the curly braces, still seeing the same results on both connectors.
     
    Cheers,
    Cory
  • Expiscornovus Profile Picture
    32,521 Most Valuable Professional on at
    HTTP connector for assignLicense to Group failing with 404
     
    I see you used the below url. Have you used curly braces in all your tests? Normally the group id is without the curly braces.
    https://graph.microsoft.com/v1.0/Groups/{c1e72ce6-fd55-45a5-bead-79f9ba5e554e}/assignLicense
    Can you try the below instead
    https://graph.microsoft.com/v1.0/groups/c1e72ce6-fd55-45a5-bead-79f9ba5e554e/assignLicense
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • Cory Teale Profile Picture
    14 on at
    HTTP connector for assignLicense to Group failing with 404
    I did try adding the disabled plan property but no change.
     
    I tried the Invoke an HTTP request from the HTTP with Microsoft Entra ID (preauthorized) connector and get different errors but the same result, the license gets applied but the return shows an error, this time it's 401 - InvalidAuthenticationToken
     
    Input:
    {
        "host": {
            "connectionReferenceName""shared_webcontents-1",
            "operationId""InvokeHttp"
        },
        "parameters": {
            "request/method""POST",
            "request/url""https://graph.microsoft.com/v1.0/Groups/{c1e72ce6-fd55-45a5-bead-79f9ba5e554e}/assignLicense",
            "request/headers": {
                "Content-type""application/json"
            },
            "request/body""{\n  \"addLicenses\": [\n    {\n      \"disabledPlans\": [],\n      \"skuId\": \"314c4481-f395-4525-be8b-2ec4bb1e9d91\"\n    }\n  ],\n  \"removeLicenses\": []\n}"
        }
    }
     
    Output:
    {
        "statusCode"401,
        "headers": {
            "Transfer-Encoding""chunked",
            "Vary""Accept-Encoding",
            "Strict-Transport-Security""max-age=31536000",
            "request-id""11163cdd-78b1-41ae-b77c-bbf937d138bc",
            "client-request-id""11163cdd-78b1-41ae-b77c-bbf937d138bc",
            "x-ms-ags-diagnostic""{\"ServerInfo\":{\"DataCenter\":\"Canada East\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"002\",\"RoleInstance\":\"QB1PEPF00011A1C\"}}",
            "WWW-Authenticate""Bearer realm=\"\", authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\", client_id=\"00000003-0000-0000-c000-000000000000\",PoP realm=\"\", authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\", client_id=\"00000003-0000-0000-c000-000000000000\", nonce=\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IkUyM0YzQzlGOTVBMjRFOTMyMTJGM0I4MEE5NzQ3QzYwMkNCQjk2REEifQ.eyJ0cyI6MTc1OTQyODAwMH0.e7FLeMXdf7qLDqimkn6o4pco-Q2PeYQtE7B_SmjiPqa7MWpIHBv8BAC3LkfLdgpMkTBku59vlYJxYZvPPVzFXA61hkopQfDu6W-Oo_3QnPnfnIoqRF_CGjHRv11EOe1HNmNMNyHN9EnyS3Mr8_L3aCjedZ9zJW57Bs8zyVPVUhWkyZbg_vX7qcK9eaY5rRydFqw7cG2fRzywPUI8TFNgfWB0B4F63p0-mPtXJMjHkuTbkhvPBmMGkNms2OHF9azBCfQnJOsGg9Ugo7uawEE-iyB-i6ezxhxzLvUMp6KzjRPvjNYJlYD3RxYLuhNiC7OXFGw7cz6I5nqejdlL5Cm0yg\"",
            "Date""Thu, 02 Oct 2025 18:00:40 GMT",
            "Content-Type""application/json",
            "Content-Length""237"
        },
        "body": {
            "error": {
                "code""InvalidAuthenticationToken",
                "message""Access token is empty.",
                "innerError": {
                    "date""2025-10-02T18:00:40",
                    "request-id""11163cdd-78b1-41ae-b77c-bbf937d138bc",
                    "client-request-id""11163cdd-78b1-41ae-b77c-bbf937d138bc"
                }
            }
        }
    }
     
     
  • Expiscornovus Profile Picture
    32,521 Most Valuable Professional on at
    HTTP connector for assignLicense to Group failing with 404
     
    Have you tried reproducing the issue with a different HTTP action (for example the Invoke an HTTP request from the HTTP with Microsoft Entra ID (preauthorized) connector? Might be worth double checking if the issue occurs in that one as well.
     
    Have you also tried adding the disabled plan property (within the addLicenses array) with an empty array to the body json. Does that make any difference?


     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 533 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 368 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 290 Most Valuable Professional

Last 30 days Overall leaderboard