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

Code before:
                    )
                    continue

                resource_type = resource_types[name]
                if (
                    location not in resource_type.locations
                    and len(resource_type.locations) > 0
                ):
                    unsupported.append(
                        "%s/%s is unsupported in %s" % (namespace, name, self.location)
                    )

        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:
        """

Review comment (suggestion):
Previous code should be fine, or you hit an issue with it ? 
https://docs.python.org/3/library/stdtypes.html#truth-value-testing

Code after:
                    continue

                resource_type = resource_types[name]
                if (
                    location not in resource_type.locations
                    and len(resource_type.locations) > 0
                ):
                    unsupported.append(
                        "%s/%s is unsupported in %s" % (namespace, name, self.location)
                    )

        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.