Forum Discussion

jkrolczy's avatar
jkrolczy
Regular Contributor
4 years ago

SoapUI: Anyone able to connect to Azure Portal using SoapUI: REST ?

Anyone able to connect to the Azure Portal using SoapUI : REST ?

 

https://docs.microsoft.com/en-us/rest/api/azure/ 

 

I have a REST SoapUI project that from a POST will generate files, etc in the Azure Portal.

I need to access the Azure Portal (hopefully with SoapUI using Azure REST API calls to access

the specific areas.

 

Any help here would be very much appreciated ðŸ™‚

 

 

4 Replies

  • jkrolczy's avatar
    jkrolczy
    Regular Contributor

    Adding more description to the problem I am trying to figure out.

     

    I am looking to see how with SoapUI to create the request into the Azure Portal and then be able to take advantage of the Azure REST APIs available for use.

     

    https://docs.microsoft.com/en-us/rest/api/azure/#

     

    The Block here for me is for this Request -- because I am sure the Header and Bearer will need the auth tokenid to access the Azure Portal just like the concept of logging into the Azure Portal UI side.. You as a user are authenticated by the Azure AD and then allowed access.  So what would I need to put in my POST or GET request header/bearer\etc.  to mimic this Azure Portal authentication? 

     

    RFC 6749:  https://tools.ietf.org/html/rfc6749 

     

    Setting up OAuth 2.0 may be the area of interest I need to figure out for Azure Portal access ?
    Also, trying to figure out if I need to register open source SoapUI with the Azure Portal 

    to include the needed values for the OAuth 2.0 to be accepted correctly.

     

    By sending the Request w/ OAuth 2.0 correctly, I believe I would then get a tokenID back which I can then

    put into my SoapUI REST request :  Authentication included in the Header with Bearer containing this tokenID.

     

    • jkrolczy's avatar
      jkrolczy
      Regular Contributor

      Replying back to this thread on my steps to finally get the Bearer token for the Azure AD:

       

      I followed a YouTube example on Azure REST API using PostMan on going through the steps in the Azure Portal

      ( https://www.youtube.com/watch?reload=9&v=ujzrq8Fg9Gc )

       

      I App registered SoapUI, created the secret_id, and I got my IT to add my registered app (SoapUI) in the subscription I test against with the role of Contributor.

       

       Now I was in business to get my Azure AD Bearer Token:

       

      In SoapUI, for my Request -> Auth Tab

      Added a New Authorization

         Type: OAuth 2.0

         Profile name:   AzureADBearerToken

       

      On the config window:

         OAuth 2 Flow:   Client Credentials:  Grant

         Client Identification:   ###############

         Client Secret:  #############

         Access Token URI:   https://login.microsoftonline.com/:tenant_id/oauth2/token

       

         fill in your tenet_id obtained from Azure Portal

       

      i.e.:

      https://login.microsoftonline.com/7285f0e5-8064-4ca2-7e54-6482cff6601e/oauth2/token

       

      Click ‘Get Access Token’

       

      Access Token:  text box in SoapUI should get populated with your Azure AD Bearer Token

      Now you have the Bearer Token when needed for Request