Skip to content

WebAppsClient.GetFunctionsAdminToken throws error: "unmarshalling type **string: invalid character '<' looking for beginning of value" #23319

Open

Description

Bug Report

Module:
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice

SDK version:
latest

Function that throws an error:
https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice#WebAppsClient.GetFunctionsAdminToken

https://github.com/Azure/azure-sdk-for-go/blob/sdk/resourcemanager/appservice/armappservice/v1.0.0/sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go#L7718

Error below:
unmarshalling type **string: invalid character '<' looking for beginning of value

When I send a request to the following endpoint using Microsoft's REST API Try It (in order to do a second test), I get a HTML page back:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token?api-version=2023-12-01

Response:

<!DOCTYPE html>
<html>
<head>
    <title>Your Azure Function App is up and running.</title>
    <style type="text/css">REDACTED</style>
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.6.0.min.js"></script>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.13.2/jquery-ui.min.js"></script>
    
<body>
REDACTED
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    App ServicesMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions