Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication issue in Azure US Gov cloud #2492

Open
bappadityams opened this issue Oct 15, 2024 · 2 comments
Open

Authentication issue in Azure US Gov cloud #2492

bappadityams opened this issue Oct 15, 2024 · 2 comments

Comments

@bappadityams
Copy link

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 ]$


@silenceJialuo
Copy link

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.

@Flanker32
Copy link
Member

@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>
                    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants