azure-maven-plugins icon indicating copy to clipboard operation
azure-maven-plugins copied to clipboard

Authentication issue in Azure US Gov cloud

Open bappadityams opened this issue 1 year ago • 2 comments

We have tried multiple Authentication methods for azure-mavens-plugins based on the Authentication · microsoft/azure-maven-plugins Wiki (github.com) e.g. Service Principal, Azure CLI but no luck. We still getting auth issues while deploying app in App service (JBOSS EAP 7) in Azure US Government.

Image

Image

Image


[INFO] Copying webapp resources [/home/adm_jlee/app-service-java-quickstart/petstore-ee7/src/main/webapp] [INFO] Webapp assembled in [130 msecs] [INFO] Building war: /home/adm_jlee/app-service-java-quickstart/petstore-ee7/target/applicationPetstore.war [INFO] [INFO] --- azure-webapp-maven-plugin:2.12.0:deploy (default-cli) @ petstoreee7 --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.361 s [INFO] Finished at: 2024-09-24T16:23:09Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:deploy (default-cli) on project petstoreee7: login with (AUTO): device code consumer is not configured. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException adm_jlee [ ~/app-service-java-quickstart/petstore-ee7 ]$


bappadityams avatar Oct 15 '24 19:10 bappadityams

The error message looks like "there are no subscriptions in this account." @Flanker32, could you please take a look at this issue and identify the root cause.

silenceJialuo avatar Oct 17 '24 02:10 silenceJialuo

@bappadityams Thanks a lot for your report and sorry for the late response. This might be an issue of authentication configuration, could you please add following config to plugin configuration in pom.xml and try again? For more info, please refers https://github.com/microsoft/azure-maven-plugins/wiki/Authentication#type

            <plugin>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-functions-maven-plugin</artifactId>
                <version>${azure.functions.maven.plugin.version}</version>

                <configuration>
                    <auth>
                        <environment>azure_us_government</environment>
                    </auth>
                    ...

Flanker32 avatar Oct 24 '24 09:10 Flanker32