Authentication issue in Azure US Gov cloud
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.
[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 ]$
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.
@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>
...