private def getAadAppParamsFromKeyVaultImpl()

in connector/src/main/scala/com/microsoft/kusto/spark/utils/KeyVaultUtils.scala [63:85]


  private def getAadAppParamsFromKeyVaultImpl(
      client: SecretClient,
      uri: String): AadApplicationAuthentication = {
    val id = client.getSecret(AppId)
    val key = client.getSecret(AppKey)

    var authority: Option[String] = None
    try {
      authority = Some(client.getSecret(AppAuthority).getValue)
    } catch {
      case e: Exception => {
        println(e)
      }
    }
    if (authority.isEmpty) {
      authority = Some("microsoft.com")
    }

    AadApplicationAuthentication(
      ID = if (id == null) null else id.getValue,
      password = if (key == null) null else key.getValue,
      authority = authority.get)
  }