Repository: microsoft/onefuzz
File: src/deployment/deploy.py (Python)

Code before:

        if unsupported:
            print("The following resources required by onefuzz are not supported:")
            print("\n".join(["* " + x for x in unsupported]))
            sys.exit(1)

    def create_password(self, object_id: UUID) -> Tuple[str, str]:
        return add_application_password(
            "cli_password", object_id, self.get_subscription_id()
        )

    def get_instance_urls(self) -> List[str]:
        # The url to access the instance
        # This also represents the legacy identifier_uris of the application
        # registration
        if self.multi_tenant_domain:
            return [
                "https://%s/%s" % (self.multi_tenant_domain, name)
                for name in [
                    self.application_name,
                ]
            ]
        else:
            return [
                "https://%s.azurewebsites.net" % name
                for name in [
                    self.application_name,
                ]
            ]

    def get_identifier_urls(self) -> List[str]:
        # This is used to identify the application registration via the
        # identifier_uris field.  Depending on the environment this value needs
        # to be from an approved domain The format of this value is derived
        # from the default value proposed by azure when creating an application
        # registration api://{guid}/...
        if self.multi_tenant_domain:
            return [
                "api://%s/%s" % (self.multi_tenant_domain, name)
                for name in [
                    self.application_name,
                ]
            ]
        else:
            return [
                "api://%s.azurewebsites.net" % name
                for name in [
                    self.application_name,
                ]
            ]


Review comment (suggestion):
```suggestion
        if self.multi_tenant_domain:
            return "https://%s/%s" % (self.multi_tenant_domain, self.application_name)
        else:
            return "https://%s.azurewebsites.net" % self.application_name
```

Code after:

        if unsupported:
            print("The following resources required by onefuzz are not supported:")
            print("\n".join(["* " + x for x in unsupported]))
            sys.exit(1)

    def create_password(self, object_id: UUID) -> Tuple[str, str]:
        return add_application_password(
            "cli_password", object_id, self.get_subscription_id()
        )

    def get_instance_url(self) -> str:
        # The url to access the instance
        # This also represents the legacy identifier_uris of the application
        # registration
        if self.multi_tenant_domain:
            return "https://%s/%s" % (self.multi_tenant_domain, self.application_name)
        else:
            return "https://%s.azurewebsites.net" % self.application_name

    def get_identifier_url(self) -> str:
        # This is used to identify the application registration via the
        # identifier_uris field.  Depending on the environment this value needs
        # to be from an approved domain The format of this value is derived
        # from the default value proposed by azure when creating an application
        # registration api://{guid}/...
        if self.multi_tenant_domain:
            return "api://%s/%s" % (self.multi_tenant_domain, self.application_name)
        else:
            return "api://%s.azurewebsites.net" % self.application_name

    def get_signin_audience(self) -> str:
        # https://docs.microsoft.com/en-us/azure/active-directory/develop/supported-accounts-validation
        if self.multi_tenant_domain:
            return "AzureADMultipleOrgs"
        else:
            return "AzureADMyOrg"

    def setup_rbac(self) -> None:
        """
        Setup the client application for the OneFuzz instance.
        By default, Service Principals do not have access to create
        client applications in AAD.
        """
        if self.results["client_id"] and self.results["client_secret"]:
            logger.info("using existing client application")
            return

        app = get_application(
            display_name=self.application_name,
            subscription_id=self.get_subscription_id(),